3 ms·
> I thought we were all in agreement that Python would be the only programming language that maintains structure through whitespace so that we could all ceasele
by danharaj 11y ago
> I thought we were all in agreement that Python would be the only programming language that maintains structure through whitespace so that we could all ceaselessly make fun of it.
Haskell and its whitespace sensitivity are older than Python.
- cruhl 11y agoA lot of people don't realize Haskell can be used without whitespace sensitivity C-style.
- david-given 11y agoSure, but as all code that actually exists in the real world uses the whitespace sensitive syntax, you're still going to have to interact with it to get things done.
- Retra 11y agoAlmost every language has whitespace sensitivity, it's just a matter of degrees. For instance, in C the following lines have different semantics: int a = 3; inta=3;
- rprospero 11y agoA more extreme form of whitespace sensitivity in C are the two following statements, which are identical and differ only in their whitespace. x = y++ + z; x = y + ++z;
- mercurial 11y agoThat's a pedantic argument. What "whitespace sensitivity" means when talking about Python/Haskell vs other languages is fairly well-understood (use indentation to delimit blocks). For my money, I'll take Python's consistent use of ":" to start a block, though.
- evincarofautumn 11y agoAnd unlike in Python, in Haskell the whitespace-sensitive syntax is just sugar for curly braces and semicolons, which you are free to use instead. Even so, people overwhelmingly prefer the whitespace syntax, so the author’s dismissal isn’t backed up by the evidence.