4 ms·
As a programming language researcher I'm definitely biased here. But I recommend anyone interested try to write their own programming language, because even if
by armchairhacker 2y ago
As a programming language researcher I'm definitely biased here. But I recommend anyone interested try to write their own programming language, because even if you never even finish the compiler, I think it's worthwhile.
Compilers include a lot of discrete algorithms and data-structures: trees (syntax), graphs (intermediate representation), fixed-point algorithms (static analysis); they also include a lot of difficult problems, like how to handle forward declarations (for recursive functions) and closures. And thinking about programming language design requires thinking about program design: deciding the set of features to make a language maximally expressive without over-complicating it or permitting spaghetti code, is a lot like deciding the set of methods to make an API maximally usable without over-complicating it or permitting invalid uses. Writing a programming language makes you a better programmer.
Similarly, designing and implementing a game engine makes you better understand game development (learn what is slow and how everything works, along with a lot of complex data-structures and algorithms). And writing an OS makes you better understand how to use maxOS/Windows/Linux. And writing a frontend/backend without using the popular frameworks probably makes you better understand how to use those frameworks...
Also, I recommend you try to make the language (or game engine or OS or ...) unique in some way that you think is better than how existing ones do it (and if you can't think of any improvements, don't make a new one, but you probably have at least some ideas). And try not to just read literature and re-implement it, it's OK to use libraries for parts that already exist. Otherwise you could just take an online (or in-person) course, which is fine, but it doesn't build critical thinking in the way that focusing on what you're interested in does.