9 comments

[ 0.30 ms ] story [ 42.2 ms ] thread
Really funny how the inspiration is python and haskell but there are 0 features from haskell.
Type declarations are similar to Haskell's. Haskell is also whitespace dependent.
That's not what makes Haskell what it is. It's not the type declaration syntax or the white space awareness. In fact those things are so superficial that they might as well not be mentioned.
While this is true, the post lists 9 specific examples of features directly below that quote, of which 5 are found in haskell. He never said he tried to capture the essence of Haskell, simply that features in his language were inspired (in part) by Haskell.
Here's a relevant book in the works that everyone should keep their eye on. http://beautifulracket.com/

It'll be interesting to compare how "making your own language" is achieved in both guides. Although, the racket situation may be super different, the basic steps seem to be similar.

This brings back so many memories from my compilers class back in school. Lexers to generate tokens, tokens to parsed from grammar, then translated to intermediate code... And those pesky ASTs...
I find it interesting there is no mention of Backus-Naur Form (BNF) in here. It's the formal language to describe the syntax of programming languages.

Nor of there a mention of Flex/Bison or Lex/Yacc. I know those tools aren't cool... being decades old and all. But they are very battle hardened and make development much faster.

I don't know the background of the author or if they have a computer science degree. And I am most definitely not one to do something one way just because that is the way it has always been done. But articles like this seem to fly in the face of decades of computer science advancement. As a fun project where you learn a lot, great, I just hope someone doesn't try to use this to make anything that isn't a toy language.