Tuesday, March 04, 2008

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.

1 comment:

Michael said...

I actually did use calls to Java from Perl. It makes sense for some algorithms where you want to make use of Javas strict typing system when implementing an algorithm that may become messy with Perl. After the algorithm itself has been implemented in Java, it is more comfortable to call and use it from Perl so I think both languages have their advantages.