Friday, May 22, 2009

A small request for compiler writers

If you're writing a compiler, and you happen to issue an error message like:


[javac] C:\src\xxx.java:230: ')' expected
[javac] }
[javac] ^

It would be really nice if you could take the time to make that error message also say something like


Unmatched left parenthesis was seen on line 184


That way I wouldn't have to fiddle around using hacky techniques like commenting out half of my program to try to figure out where I accidentally left out the parenthesis.

It seems that modern compilers do usually issue quite precise messages; maybe this particular one just fell through some crack in the parse techniques where the compiler just had no idea where it was that the parenthesis matching got out of sync.

Oh well, I eventually found it. Just wish I could have that 15 minutes of my life back.

1 comment:

  1. Spend 15 minutes learning how to use Eclipse and that won't be a problem anymore. =)

    ReplyDelete