2 ms·
What would you propose instead? Which language is easy enough to compile, and pleasant enough to write a compiler in?
by cousin_it 11y ago
What would you propose instead? Which language is easy enough to compile, and pleasant enough to write a compiler in?
- pjmlp 11y agoLisp derived languages are quite easy to implement, e.g. "An Incremental Approach to Compiler Construction" paper. Wirth has published compiler books based on Pascal and Oberon, quite simple single pass implementations. The language proposed by the Tiger book variants (a ML like language) is also quite simple to implement.
- davmre 11y agoMy compilers course used Java to implement a simplified Java-like language. Writing a compiler in Java isn't as gloriously straightforward as in Lisp/ML/Haskell, but it's a lot less annoying than C.
- eru 11y ago> Which language is easy enough to compile, and pleasant enough to write a compiler in? Why write a self-hosting compiler? Use Haskell to write a C compiler, if you must. (If you want the identity there, use a Scheme to write a Scheme compiler.)