4 ms·
Agree about Haskell... as far as I'm aware there is actually no declarative/easily-readable definition of the Haskell syntax that is also complete, especially w
by wubrr 3y ago
Agree about Haskell... as far as I'm aware there is actually no declarative/easily-readable definition of the Haskell syntax that is also complete, especially when it comes to the indentation rules, and the syntax is basically defined by the very (ironically) imperatively-defined GHC parser[0].
I prefer a syntax like in Pure[1], where the ambiguous, hard to parse indentation-based syntax is replaced by explicit semicolons (Yeah, you can use braces/semicolons in Haskell as well, but most code doesn't).
[0] https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser/Lexer.x#L2060-L2092 https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser/L...
[1] https://agraef.github.io/pure-lang/ https://agraef.github.io/pure-lang/
- Arelius 3y agoJust wanted to say, thanks for the link to pure... I've been thinking a lot recently about languages based on term rewriting and hadn't seen it somehow.