Your own compiler – should you or should you not?

Joel Spolsky shares why they have their own compiler and how long it took them to write it.

Most people don’t realize that writing a compiler like this is only about 2 months work for one talented person who read the Dragon book.

While compilers seem like a thing of the past for many in the industry, I find it not to be so. Recently, I was participating in one project that had to do a lot with web, and web data aggregating. Somehow, we almost ended up writing our own compiler. The problem was tough and there seemed no other way to solve it. Unfortunately, the project took a different path and died later.

Also, looking around with a bit wider open eyes, I’ve realized that there are quite a few people working on compilers now. One of the big companies is, of course, Google. They’ve recently released their tool which takes Java code and compiles it into AJAX-ified HTML, CSS, and JavaScript. And although I haven’t tried using it yet, it sounds like a really really really neat solution. Developing in AJAX is a pain. Coverting all the pain into machine’s work seems like a sensible idea.

5 thoughts on “Your own compiler – should you or should you not?”


  1. Yes who doesn’t know about google web toolkit, it is even integrated in IDEA 6. But it was just a bit strange to call it “tool which takes Java code and compiles it into AJAX-ified HTML, CSS, and JavaScript” even though this is essentially what it is :). It is a Java library/framework for building AJAX web applications.

Leave a Comment