Your skill will accomplish
what the force of many cannot
A Perl vs. Java fight brewsby Moron (Curate)
|on Jul 24, 2006 at 13:03 UTC||Need Help??|
Moron has asked for the
wisdom of the Perl Monks concerning the following question:
The scenario is that for nearly ten years, (intensive) customisation of a certain datawarehousing package has been done mainly in the following languages:
- Formula Engine (which provides scripting glue between a time-series database and a relational database)
- ac_bl (SQL with an object layer over it)
- some other specialised lanaguages.
One or two pieces of Perl have crept in here and there, but the major services of the customised system have been written in a blend starting with ksh and variously spawning interpreters for the other languages.
Beyond a certain point in time, my continued presence at this site will probably depend on my winning the case to replace ksh with Perl as the future language for customisation. I have four colleagues, none of whom have Perl experience. The colleagues agree that change is necessary but are of the opinion that Java should be the language of choice (there is more Java in the original system than Perl, although the manufacturer has written a Perl API (= some modules) as well as a Java API). The features of Perl I can see winning against ksh for this system are as follows:
- greatly reduce the spawning of new ksh processes
- ready interface to unix system services
- Open3 to control input and output between existing utility programs
- associative arrays
- scoped untyped variables
- flexible choice of procedural versus OO (ksh is only procedural)
- perl -d (debugger - no such thing for ksh)
- perl's regexp engine is better than awk/sed's without needing to shell out
- perl's hashes are more flexible and scopable than formula engine's (Formula Engine provides only a single global hash).
- perl can communicate more effectively with background processes.
The problem is, how do such features compare with Java? I don't know enough Java to know what to look for, (other than an impression that there are open source Java libraries versus CPAN modules) although I can manage to put together the comparative study for Perl versus C++. Anyone out there know enough Perl and Java to be able to say how Java would compete with Perl for fulfilment of the same benefits? (Although I want Perl to win, I still have to be scrupulously honest and fair to win the case.)
Free your mind