Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Perl vs. Compilable Languageby mstone (Deacon) |
on May 03, 2005 at 01:55 UTC ( [id://453465]=note: print w/replies, xml ) | Need Help?? |
Familiarity does play a role, but Perl has a very low LOC:FP (lines of code per function point) ratio. There's a table here which compares several languages (it's toward the bottom of the page). Function points are a well-defined measure of how much work a program does, so the LOC:FP ratio more or less compares the sizes of programs that do the same thing in different languages. In the referenced table, assembly has a LOC:FP ratio of 575. C runs 225. Fortran runs 210. C++ and Java run about 80. Perl weighs in at 50. The ratio matters because research has shown that the cost of a single line of code remains more or less constant regardless of what language you use. Languages that do the most with the fewest lines of code tend to be more economical over the long run. No matter how familiar someone is with C++, they still have to write a certain amount of memory management code. Java has garbage collection, but you have to write the boilerplate and conversion code associated with its strict type system. Those trim back some of the advantages gained from familiarity. The ratio is just an average, though. And for the relatively small difference between Java/C++ and Perl, there are plenty of other factors which can tip the balance either way.
In Section
Seekers of Perl Wisdom
|
|