5 ms·
That looks pretty awesome. Thanks for the suggestion. Looks like it gets to a good amount of functionality too, with first class functions and closures and the
by dvlsg 8y ago
That looks pretty awesome. Thanks for the suggestion. Looks like it gets to a good amount of functionality too, with first class functions and closures and the like.
- stevekemp 8y agoVery much so, and once you've completed the book there are a lot of extensions various people have made. For example here's a version with classes / OO-behaviour: https://github.com/haifenghuang/monkey https://github.com/haifenghuang/monkey Or here's my version which "just" adds some more standard-library facilities, allowing you to open/read/write files: https://github.com/skx/monkey https://github.com/skx/monkey I found the language fun to play with, and I used a virtually identical lexer and parser-idea in a recent project of my own - rather than "parsing" an input-file with regular-expressions, which is how I would have previously approached the implementation of simple DSLs. I guess that showed I'd learned something useful!