So as a new web programmer (background is mostely in C,C++, and Python) with no javascript experience (or desire to experience it, based on what I have seen) I have been doing some precursory research on CoffeeScript and am really liking what I see. One cool little nuance I noticed was that CoffeeScript was written in CoffeeScript, which is cool… but I don’t really understand how that is possible. Unfortunately I opted to take Network Security instead of Compilers during my last senior level Computer Science courses.
I have heard of people writing languages in target language to interpret using existing compilers for that language, but I can’t dig up any info on how this might work since this is the first implementation.
My guess is an embedded shell script that might take care of laying down some of the initial framework for building a self-referential (does this term properly describe this behavior?) language?
This is nothing new. C compilers have been written in C. Python has been written in Python.
It’s possible to use a compiler for
Language Xto compile a newer version of itself, with more features. It’s called bootstrapping.BTW, if you want to learn more about compilers, despite having missed out at uni, have a look at Learning to write a compiler — specifically, the Dragon Book.