Apr 11

Walter Bright on making programming languages

Hacker News has been on a bit of a Walter Bright (creator of D) festival recently, which is fine as he seems pretty great. Two articles of his from Dr. Dobbs:

So you want to write your own language?: “Redundancy is important” — Walter makes the point that a truly non-redundant syntax would mean that anything was valid and it would be impossible to generate error messages. So syntax redundancy is actually very useful. He also recommends not using a parser generator, also in the name of good error messages: parser generators aren’t very good at them. (I’d argue that hand-written parsers aren’t usually very good at them either but I guess you probably do have a better chance of adding them.) Other interesting parts of this article are error-message poisoning (he’s big on error messages) and the concept of lowering as proof of design (and a way to simplify the implementation).

How I came to write D: "In 1999, I decided I was retired and spent about six weeks watching TV until I thought I'd go mad.” (This isn’t what motivated him to write D, it’s what motivated him to stop not writing D.)