Tuesday, March 04, 2008

I wouldn't let it lie

Sorry that last article has really gotten to me. I really do not want to do down people's efforts on these Perl to Java projects because I can see that there has been a lot of time spent on them. It is just that this article is recommending me to use a language which to be quite honest is not a good fit for Java. A lot of these libraries seem to have been conceived about 3-4 years ago when there was a lack of an actively developed scripting language (well there was Jython but that was not being actively developed by then).  But now we've got:
  • JRuby
  • Jython (being developed again)
  • Groovy (which really is scriptable Java with lots of sugar)
  • Rhino
I look at the list of libraries and really there's something each of these languages which can do a lot better not to mention running in the JVM. In a way the author is right these are 10 modules a Java programmer should know about if only to remind themselves that there has got to be a better way now.

BTW I like Perl. I like it a lot :-)

Wow ... seriously?

I've just had the misfortune to read an article about how to use Java from Perl. Maybe I am missing the point here but that sounds like one of the most awful things you could possibly do. I've spent the past 5 years working in bioinformatics (an industry where Java & Perl are the major players outside of algorithm work) and not once have I ever thought "I wish I could use my Java in Perl".

It's amazing really but I've encountered this exact problem of Java to Perl communication over the past 3 weeks the final decision was to communicate using JSON & then leave Perl to work over the incoming JSON data. This works brilliantly and we have a very clear separation of concerns between Java & Perl. Java gets the data, passes it into Perl & then Perl can manipulate it to it's hearts content. It's even good for testing since we have canned JSON files with data.

Now if it was a Perl implementation in the JVM I think I'd be more interested; but for the moment I think I'll pass on these modules.