5 ms·
Right, it is subjective, but requiring indentation imposes a higher baseline level of readability: what you see is what you get. This is important when you're
by brodie 17y ago
Right, it is subjective, but requiring indentation imposes a higher baseline level of readability: what you see is what you get.
This is important when you're working with more than just your own code. It's like a forced style guideline, and it gets even better when everyone conforms to Python's other optional style guidelines. It reduces friction.
- jacquesm 17y ago> It reduces friction. Between python programmers, yes. But it increases friction between those that are 'in' and those that are not (yet). And even some of those that are 'in' have their reservations. I completely understand the reasoning behind it, but the number of times that I've run in to practical problems because of having some kind of delimiter is 0, the number of times that I've run into some kind of trouble with python because of not having delimiters is starting to add up. This may be a factor of inexperience, time will tell. But it is definitely a new 'source' of bugs, and sources of bugs are in my opinion things that you avoid like the plague when designing a programming language. Even in 'C' (or C++, or anything that derived it's syntax from those languages) I always found it both wrong and inconsistent to be able to say: if (a) b++; To me that's asking for misery, you could remove that whole if(a) line and the whole thing would remain syntactically correct. I think of the { } just like I think of guardrails on the highway. They don't make stuff prettier, sometimes you can't look across, but they certainly keep you safer.
- jbellis 17y ago> Between python programmers, yes. Optimizing for any other audience would be ... strange, especially at this point in python's lifecycle.
- jacquesm 17y agoTrue, it is absolutely beyond that. But I think that it would have helped significantly in an earlier stage, I even think that PHP would have been run into the ground. In the long run that may still happen, there definitely is shift happening.