mastodon.me.uk is one of the many independent Mastodon servers you can use to participate in the fediverse.
Open, user-supported, corporation-free social media for the UK.

Administered by:

Server stats:

502
active users

@Alastair Ugh, just no. Braces and semi-colons everywhere. So many hours spent untangling loops because of inconsistent indentation. No thanks.

@Alastair To wit, “Today class, we use Python to learn logic.”

@Alastair I always liked Haskell’s approach. Use the semicolons and braces if you want. The first stage of the compiler inserted them. But it was perplexing for students to get an error message complaining about an unexpected semicolon when there wasn’t one in the source. Python's use of indenting is neither here nor there. It should die in a fire because of its type system, if it can be called that.

@Alastair
I see your python with braces and raise braceless c

@Alastair the semicolons are mandatory because otherwise set and dict initialisers don’t work, what a joke

@Alastair
I saw this before and want to know if it's more than, like, a wrapper.

Will it autoformat as I type in nvim?

@herko

@Alastair @vmstan

This bython is a whole abstraction layer on top. .by files mean no help from linters, LSPs, or IDEs !

@Alastair This reminds me of Steve Bourne’s misguided attempt to make C look like Pascal by abusing macros. The more things change. . .

@Alastair The revolution is here. I love U.

@Alastair or just type "from __future__ import braces" for the official implementation ;)

@Alastair
My god...
J'ai commencé python justement parce que ça me gonflait les {}

@Alastair I’ll admit I’ve not done much python development, but I find the indentation to be one of its less annoying features.

@Alastair I might actually try learning Python now.

@Alastair I remember that several years ago I saw this and it was meant as a joke, so I never used it as it would not be maintained.
But the joke mention has disappeared, or it is something different of what I saw previously.
So maybe all my code will now be bython?

@Alastair I had this idea 8 years ago and I'm glad to see someone implement it - it should be the default in all #python editors

@Alastair best part:
bython adds braces.
when running, bython removes the braces and converts to whitespace.
cpython then converts the whitespace to special tokens (essentially braces) before its actually run

@Alastair can it also automatically add self as 1st argument in method definitions? ;)