Hacker News new | ask | show | jobs
by stevekemp 13 days ago
Making new programming languages is something a lot of people do for fun, and it's also covered in most CS degrees too, albeit briefly.

We have so many programming languages because they tend to have a particular niche in which they're useful. Many languages are still in use even though they're very old (C, FORTRAN, COBOL), and others just keep getting updated over time and have a large userbase (Java, Perl, Ruby, Python).

99.99% of all new programming languages never get a critical mass of users. People create a new language to learn something, and they're the only user. e.g. I've written a few FORTHs, have spent the past few weeks on writing a lisp compiler, and in the past wrote BASIC interpeters for fun.

If you want to make your own "crafting interpreters" is a good read:

https://craftinginterpreters.com/contents.html

But there are a million other tutorials on writing a simple lexer/parser/interpreter/compiler, and a lot of academic literature (e.g. The Dragon Book).