Hacker News new | ask | show | jobs
by jopamer 3961 days ago
A few years back, Dr. Dobb’s posted a pretty great series of articles on some of the techniques RBK Dewar employed when building the original SPITBOL compiler: http://www.drdobbs.com/cpp/some-programs-are-poorly-designed...

(I was lucky enough to study compilers under Prof. Dewar when I was a grad student at NYU - I still have my notes on SPITBOL’s architecture, somewhere…)

1 comments

Excellent article, very clever optimizations given the tradeoffs. From the article:

> We were talking about students' tendency to let the compiler substitute for thinking

This is actually why I use OCaml. Not going to comment on whether useful error messages are a detriment to pedagogy, but offloading thinking to the compiler is a lifesaver.

Definitely. It doesn't prevent, say, off-by-one errors (and in general, errors when you manipulate several items of the same type), but if you structure your program correctly, you can be very confident about your code.

Though OCaml's errors are not always the most explicit or nicely written.