Ask HN: In which programming language is it better to make your own language?
5 Forgret 10 8/9/2025, 2:36:05 PM
I decided to create my own programming language but I don't know which one to use, some say Python, others say C.
Please help me decide.
So then you could say it was programmed in english*
*Or whatever human language you want.
I then used python match syntax to convert my ast to C.
Thus, I vote Python: it has this amazing parser library, it's garbage-collected (no need to fiddle with memory allocations, like in C), it's dynamically typed (so you basically don't need to think about types at all), it now has a `match` statement (!) that makes it super easy to dissect your parse trees and abstract syntax trees.
Boost.Spirit https://www.boost.org/library/latest/spirit/ Boost.Parser https://www.boost.org/library/latest/parser/ (which I think succeeds Boost.Spirit Boost.Metaparse: https://www.boost.org/doc/libs/latest/doc/html/metaparse.htm...
All of these allow you to build a parser using C++ syntax and then add semantic or composed actions.
After you know what you want to build, you could convert it to C, C++, or Rust to make it fast.
[0] https://www.antlr.org/
[1] https://en.wikipedia.org/wiki/OMeta
[2] https://github.com/pczarn/panini
[3] https://github.com/topics/parser