News for hackers. Stuff that matters.
Re:OCamlers' critiques of Haskell by tormeh on Thursday August 27, 2015 @12:09PM (#10130258)
Well, because writing a compiler is pretty hard, and I would like to not juggle pointers to arrays of pointers while doing it. C wastes your time, basically. And a C-like language is profoundly unexciting, at least to me; I can almost see the assembly lying underneath.
Re:OCamlers' critiques of Haskell by kbenson on Thursday August 27, 2015 @12:24PM (#10130356)
Well, they could write a list in python, but that's more a single night's homework than an entire class (with the appropriate foreknowledge) to my understanding, so what's an interesting middle ground? A logical language (e.g. Prolog) would be interesting, but I have no idea the complexities involved. I imagine implementing in python would reduce the complexities of the actual programming step allowing more time for what I think are the interesting parts of a compiler course.
Re:OCamlers' critiques of Haskell by cousin_it on Thursday August 27, 2015 @01:02PM (#10130624)
What would you propose instead? Which language is easy enough to compile, and pleasant enough to write a compiler in?
Re:OCamlers' critiques of Haskell by davmre on Thursday August 27, 2015 @02:10PM (#10131037)
My 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.
Re:OCamlers' critiques of Haskell by pjmlp on Thursday August 27, 2015 @01:48PM (#10130901)
Lisp 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.

Re:OCamlers' critiques of Haskell by eru on Tuesday September 01, 2015 @04:58AM (#10151361)
> 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.)