Contents
Is it hard to make your own programming language?
Once you get that technique under your fingers, creating new languages isn’t difficult at all. It’s pretty easy to create something that fits definition of programming language. Something very specialised, like a simple language for controlling robots in a game. Something very abstract and low level like Whitespace.
Can you write your own compiler?
It’s totally OK to write a compiler in Python or Ruby or whatever language is easy for you. Use simple algorithms you understand well. The first version does not have to be fast, or efficient, or feature-complete. It only needs to be correct enough and easy to modify.
What programming language is used to create a programming language?
Of course, as long as you have access to Javascript, Python, C#, or another programming language. To make a programming language, you need another programming language. Is there any specific language that is easy to make a new language on, and how would I do that? Java is useful because of the many tools available.
Why would you write a compiler?
The name “compiler” is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g. assembly language, object code, or machine code) to create an executable program. A bootstrap compiler is written in the language that it intends to compile.
How can I create my own programming language?
Write a compiler that takes in strings in your language and spits out strings in C# or JavaScript or whatever language you happen to know; let the compiler for that language then take care of the heavy lifting of turning it into runnable code.
Can a compiler be written in any language?
A compiler is simply a program that translates a document in one language into a document in another language. Both languages ought to be well-defined and specific. The languages do not have to be programming languages. They can be any language whose rules can be written down.
How are compilers and language design tools built?
The compilers and tools are built like any other professional software product: by breaking the problem down, writing one line of code at a time, and then testing the heck out of the resulting program. Language design is a huge topic.
Why do you want to build a programming language?
You may want to build a programming language for a variety of reasons. One good reason is for fun, another one is for learning how compilers work. Your language could end up being very useful or not, depending on many factors. However if you have fun and/or learn while building it then it is worth investing some time on this.