Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a lot easier to format code arbitrarily when a language is whitespace-independent.

For example, to do method chaining across multiple lines, Python requires parentheses around the whole chain. That's a quirk of being a whitespace-dependent language.

In general, I think people who advocate for braces and semicolons just find it easier to reason about the code when they know that the formatting doesn't matter. All the flow is done via visible glyphs.



Haskell has an alternative parens-and-braces syntax to the offside rule; that was meant particularly for machine-generated code if I remember correctly.

Edit: I meant to add: you need to decide whether ";" is terminates or joins statements if you have statements in the language.




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

Search: