5 ms·
> And Python? It uses spaces. If you need to define a scope for complex code, then you indent the next few lines. The scope ends when the indent ends. Curiousl
by sli 8y ago
> And Python? It uses spaces. If you need to define a scope for complex code, then you indent the next few lines. The scope ends when the indent ends.
Curiously, I never see the indent scope complaint about, say, Haskell. It's always just Python. I've wondered for a long time why that is. There's the obvious one, that Python is just far more popular, but I'd expect experienced people to have used or at least seen another language that does it.
- the_gastropod 8y agoNo idea if this is true, but my gut feeling is Python is commonly written in an imperative style, whereas Haskell is more functionally written. Imperative style (especially at the beginner level) tends to include lots of nested conditionals which quickly create this indentation triangle of confusion.