What is the best programming language to make a programming language?

What is the best programming language to make a programming language?

Any language can be suitable.

However, in this type of project (where there is a lot of analysis to do), we often advise a functional paradigm language. They are very adapted to do analysis, structure data, build trees, …

But you have to choose it well. Personally, for a functional language, I would recommend Haskell or F#.

Haskell because if the program compiles, you can be sure that the only errors you will have are algorithmic (= “poorly done work”);

F# because there are some tools specially designed for the creation of the language (which helped in the implementation of F# in F#).

But other languages and tools are also perfectly suitable. C++ or Java with ANTLR or LLVM for example. Very powerful and easy to use parser and lexer generator tools, even offering a compilation to a high level intermediate assembly language.

To conclude, if you are aiming at ease, I recommend a language accepted by LLVM or ANTLR (C, C++, Java, C#, …)

If you are aiming at education, but accompanied by tools making the task easier, I recommend F#.

If you are aiming at performance, security, educational purpose, as well as a challenge, Haskell is the ideal choice.

Don’t use a language like Python, Ruby or even Javascript, there is too much going on that we don’t have control over, and it’s also hard to maintain large projects with an untyped language like Python.