Hacker News new | ask | show | jobs
by Hercuros 2246 days ago
I think that just because most people do not write compilers for a living does not mean that it’s not useful to have implemented one. Writing a toy compiler properly is an interesting programming exercise that involves steps such as parsing/validating input and transforming it in a structured way. Even if you never write a compiler again, it can teach you many things of how to approach similar problems.

(Also, Apple didn’t exactly repurpose LLVM for Swift. LLVM is just the backend, and Swift has quite a sophisticated frontend with its own optimization passes and intermediate language. It is safe to say that a lot of compiler theory and programming language design went into writing it. As another example, the compiler for Go was basically written from scratch and does not use something like LLVM for code generation.)

I do agree that learning CS theory is no substitute for actually writing software, and doesn’t make you a good software developer by itself. And there are probably plenty of excellent software developers who couldn’t recall what a Turing machine is. That said, a good knowledge of CS fundamentals is indispensable for some types of software development.

1 comments

I think the compiler project we did in college was probably one of the most valuable assignments I ever had. I still have barely any understanding of how a modern compiler works, but it made me much better and understanding compiler error messages.