Hacker News new | ask | show | jobs
by MarkusQ 18 days ago
That's more of a compiler limitation that became cultural for a while. Most languages (both natural and artificial) use delimited structures sparingly and rely more on other cues. It sometimes appears spontaneously (e.g. "∫ dx f(x)" is logically fine, but feels wrong) but in general it's rare.

The move away from indentation in programing came as a rebellion against the too-constraining fixed column languages, in the interval between punched cards and python, with a brief resurgence in the early blink tag and font potpourri web era. These days, it's perfectly reasonable.

3 comments

In my experience there are many problems with significant whitespaces, things like copying pieces of code require much more work, when indentation actually changes the logic you can not ask your tool to do it automatically - because there is no single right way to do it. Tabs vs spaces can also be a problem.
> copying pieces of code require much more work

IME, it requires less work. You just grab the piece of code you want, whereas with braces, you need to count which closing brace is the correct one.

No, significant whitespace today is still terrible, coming from Haskell, Python and Go (newlines that break expressions unreasonably)
Apparently the truth hurts.

I can't believe that the claim "python-style syntax is perfectly reasonable" deserves to be down-voted into the basement.