Re:Thoughts on Haskell
by evincarofautumn on Saturday October 17, 2015 @02:39PM
(#10405508)
And 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.
A lot of people don't realize Haskell can be used without whitespace sensitivity C-style.
Re:Thoughts on Haskell
by david-given on Saturday October 17, 2015 @03:57PM
(#10405816)
Sure, 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.
Almost 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;A 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;
That'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.
Haskell and its whitespace sensitivity are older than Python.