Porting Lessons

Ovid on 2005-01-16T23:52:14

While it's certainly true that learning different languages (and different programming paradigms in general) will be beneficial to a programmer, it's interesting to see how well those lessons hit home while actually porting an application to a new language.

There's a small Java app that does things that I want to do, but I don't want to do them in Java. Unfortunately, Perl's complete lack of multi-method dispatch has introduced quite a few bugs that I've slowly worked through. On the flip side, the parser that the Java code implements inches through strings character by character. I'm doing a faithful port just to get things working, but it will be nice to eliminate that. And while I'm whining about Java:

while (! some.method.call())
  someVar++;

I wonder if someVar is an object attribute or a local variable? You can't tell just by looking at it (fortunately Perl 6 will not have this defect.) This has resulted in several other bugs that I have to fix.