Hacker News new | past | comments | ask | show | jobs | submit login

I love Rob Pikes idea that is dumb to have scope determined by invisible characters



Python doesn’t really have scope in that way. Variables declared inside an if statement can be accessed outside of the if statement.


Control-flow blocks aren't scoped in most popular programming languages.


name one except python


Space is visible to me.


In the era that python was created in, autoformatters were not a thing and I appreciated the forced indentation. Nowadays with autoformatters being standard, the downsides of semantic white space is not worth it.


I don’t totally mind it. Poor PEP8 implementations can drive me nuts and so can the type of indentation allowed. But otherwise I can get over it.

And then there’s Bython... https://github.com/mathialo/bython


It makes scope visual and consistent. IMO it's less dumb than having scope defined by pairs of curly braces which are impossible to read without indentation and require extra effort to keep matched - unless you try to automate the matching with a good IDE.


There are a lot of tools that shred whitespace but not curly braces.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: