2 ms·
I actually think that this is pretty close to the sweet spot. You make line breaks significant, but not the indentation level. The indentation will be inferred
by ahaferburg 8y ago
I actually think that this is pretty close to the sweet spot. You make line breaks significant, but not the indentation level. The indentation will be inferred automatically from the braces. That way you can paste code that has the wrong indentation, hit save, and as long as the braces are balanced, the indentation will get fixed automatically by an auto-formatter.
I would be very interested to know how happy Python programmers are with the indentation level being significant. Did Guido ever say anything about it?
- newen 8y agoWow that's amazing. Now you'll finally be able to do what's been possible to do in C since the dawn of time.
- lgas 8y agoI worked almost exclusively in python for about five years and loved significant whitespace. It was one of the things I missed most when working in other languages. Now I work primarily in Haskell which has significant whitespace with optional braces and I still love significant whitespace and never use the brace style. In practice I found the copy/paste problem exceedingly rare to the point that it has been completely a non-issue in both languages.