How is it possible that written a programming language like CoffeeScript in itself like CoffeeScript? Firstly CoffeeScript doesn’t exist that read CoffeeScript scripts and interpret them?
0
- First you design a language A on paper and white board.
- Then you write an implementation of a language A (compiler, vm, interpreter, runtime depending on a scope of language) in language B.
- Once you have stable environment for language A, you can start writing version of environment for language A in language A.
I would say, that unless language is slow or not turing complete, it’s tools should always be implemented in it. That makes it’s much easier for developers to work with it.
4
Think of a subset of language to build another language. Don’t watch it as building A with A but instead building A with B where B is a small language.
Think of it in this way:
You build a simple interpreter with JavaScript and name it CoffeeScript, later on as your project goes bigger and bigger you start writing parts of your code with your new functions/construcs or in short – your own language like CoffeeScript.
1