3 ms·
I made this primarily because I wanted to learn more about writing an interpreter and I also wanted to experiment a little with the decisions that go into langu
by Udo 14y ago
I made this primarily because I wanted to learn more about writing an interpreter and I also wanted to experiment a little with the decisions that go into language design - so it turned out not like a "normal" C-like, but hopefully still recognizable. To my surprise, making decisions about how scope should work was actually the hardest part.
I can only recommend that every hacker does this at least once in their lifetime, it's been a real eye-opener for me in respect to problems I don't usually think too much about.
That said, feedback or questions are very welcome :)
- gngeal 14y ago"To my surprise, making decisions about how scope should work was actually the hardest part." Perhaps a thorough reading of SICP would enlighten you as to how scope should be handled if you don't want to run into problems with it.
- Udo 14y agoI know SICP, it's great. However, arguments from authority only get one so far. I think it's definitely worth experimenting with different paradigms. And I'm not done yet. However, there is something to be said for not taking "the standard way of doing things" at face value all the time, even if that means arriving at the exact same solution in the end. To my defense though, different languages behave in different ways in this respect, so at least I'm not violating the entire collective wisdom of computing (just a part of it).
- fabriceleal 14y ago> I can only recommend that every hacker does this at least once in their lifetime I've been doing this for a while now and I love interpreter implementation. The way I got started with this was through http://nathansuniversity.com/ http://nathansuniversity.com/, which teaches you how to implement interpreted languages using Javascript (it uses http://pegjs.majda.cz/ http://pegjs.majda.cz/ for generating the parser). From that I already played in C (lex/yacc for the lexer/parser), C# (irony - http://irony.codeplex.com http://irony.codeplex.com) and currently I'm enjoying F# (flex/fyacc). I already made a simple programming language from scratch (https://github.com/fabriceleal/Multitasks.git https://github.com/fabriceleal/Multitasks.git) and I'm currently implementing a subset of scheme (https://github.com/fabriceleal/Pang.git https://github.com/fabriceleal/Pang.git), which I have great proud to announce that has a working call-cc. I'm only hoping to have some time to polish them before "officially" showing them in HN or reddit.