This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Pushing intelligence into the parser / runtime
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
As you look at the various languages, and platforms out there, you often see people discussing how much intelligence should go into the parser and runtime.
Java, for example, has a very simple syntax. The parsing stage doesn't have to do and know too much (although Java 5 did add more).
Compare this to the other extremes. Lisp is incredibly simple. The MOP also makes it very powerful, and the user doesn't ever really know if the 'standard' operator they are using isn't really a tweaked out version. The MOP analagy has been:
It is like juggling with chain saws
Perl on the other hand has to have a parser which is a lot smarter. Larry comes at it from a linguistic standpoint, and wants the language to do the right thing (even if it means having a tougher parser).
I think I follow that pattern. As always, there is a tradeoff, but I would much rather have a couple of guys work on a parser that does what I want, and have the many developers work on a level above of that. I want more expresiveness in my languages. I would hate to write a book with a stripped vocabulary, and a lack of context.
However, there is obviously a tradeoff. The parser will have more bugs. It will take longer to implement, it must be proven that it CAN be implemented, and the resulting code will have more 'style' and can hence be harder to read.
On a selfish note, I don't mind spending the time to be a 'power user'. I spent the time to learn the keystrokes for vi and emacs, and I can do many tasks a lot faster there than anywhere else. As a power user you want the tools that allow you to express your ideas in as simple a way as possible.
So, it isn't for everyone, but give me the smartest parser in the world, let me write as little as possible, and I will be happy ;)