DEV Community

Discussion on: We created the Crystal language, ask us anything!

Collapse
 
matiasgarciaisaia profile image
Matías García Isaía

Hi Yaymaha!

You can read a bit about that in this blog post.

Long story short: "a language" is just an specification of how to write stuff. You can create a language right now, stating what constructs are legal in your language - and that's it.

But... A PROGRAMMING language isn't really useful unless you have something that allows people's code in that language to actually do something. So you probably would want to also provide a compiler or interpreter able to read source code in that language and make things happen.

The story of Crystal's compiler is there, in the blog post :)

You start by writing a program in other, previously existing language that can read source code from your language and turn that into instructions. Then you make your language (both specification and compiler/interpreter) more feature rich, up to the point in which you can write in your language a program that reads source code in your language and generates runnable programs - and that's the compiler/interpreter of your language, written in your language itself!