3 ms·
Internally, Python is a lot like that, too - like in Haskell, the lexer adds in brace tokens when the code is indented an unindented, which keeps the grammar si
by seventydwarves 9y ago
Internally, Python is a lot like that, too - like in Haskell, the lexer adds in brace tokens when the code is indented an unindented, which keeps the grammar simpler. I guess the main difference here is that Haskell exposes the underlying whitespace-insensitive notation to the programmer, too, whereas Python keeps it hidden.
- Tarean 9y agoHaskell is also a LOT more lenient. So stuff like if x < 5 then 42 else x + 1 + 2 is legal.