Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Vic Mercier
Vic Mercier
3,276 Points

How programming languages are made?

I always have been wondering to myself how programming language are made!

1 Answer

Michael Hulet
Michael Hulet
47,912 Points

Programming languages are implemented by making one of 2 types of programs: a compiler or an interpreter. They both accomplish the same thing, but a compiler translates the code of the language you write to code that a computer can read before your program runs (it outputs the binary file of your program), but an interpreter does it while your program runs. To make a programming language, you should design what you want it to look like, what features it should have, and exactly how you want it to work, and then you should implement a compiler and/or interpreter that can read your language. There's lots of resources online about how to do that (in fact, it's usually taught in a college setting), but if you're new to the concept, this is definitely my favorite resource: The Super Tiny Compiler. That's a very lightweight LISP-to-C compiler implemented in thoroughly commented, easy to read JavaScript, and it walks you through exactly how everything works