LWN.net Logo

Lacking manageability

Lacking manageability

Posted May 2, 2007 14:02 UTC (Wed) by robertm (subscriber, #20200)
In reply to: Lacking manageability by man_ls
Parent article: The Rise of Functional Languages (Linux Journal)

Or, a third possibility, is that functional languages are simply more compact than C++ or Java. Another data point for you is Maxima, which comes in at under 600kloc of Lisp. It would be interesting to do a proper study of "large" programs in various languages though. Of course, one would have to define "large" in a way that doesn't count amount-of-code, since that's the metric under question.

For what it's worth, my own experience (with Java, C++, Common Lisp, OCaml, and Erlang) suggests that you spend a lot less time writing near-boilerplate scaffolding in functional languages than in object-oriented ones.


(Log in to post comments)

Lacking manageability

Posted May 2, 2007 14:24 UTC (Wed) by man_ls (subscriber, #15091) [Link]

There is such a measure; it is called, confusingly enough in this context, functional metrics and it revolves around function points. Still, it says otherwise:
Statements per function point:
  • C: 128
  • C++: 53
  • Java: 32
  • Lisp: 64
Lisp would be a lower-level language than Java and slightly lower than C++. I don't know if those figures can be trusted though; your experience would seem to say otherwise.

Lacking manageability

Posted May 3, 2007 3:58 UTC (Thu) by robertm (subscriber, #20200) [Link]

Interesting. And, as you say, counter to my personal experience. I wonder where those numbers came from, exactly. The paper isn't exactly clear -- "We developed these numbers empirically using our Web applications database because the IFPUG numbers did not seem to be consistent with our current experience. This count includes the volume of work required to program Java scripts and beans on both the client and server, assuming that an appropriate Java environment were available for this distributed application."

To be somewhat facetious, I'm not terribly surprised Java does the best at creating Java beans. More seriously, I suspect from this that what the numbers measure is really "library availability", something which most functional programmers will readily admit is not (yet) a strong suit of their favorite languages. Useful if you're just gluing web browsers to databases (a large fraction of real development work, alas), but less so if you're striking out in new directions.

Lacking manageability

Posted May 3, 2007 6:09 UTC (Thu) by man_ls (subscriber, #15091) [Link]

Capers Jones in "Applied Software Measurement" (1991), p.76 shows the same values for C and Lisp. Java did not exist, and C++ does not appear on its own; object-oriented default is listed at 29.

You are not alone at pointing out that functional code does more with less. Maybe the numbers are all wrong, but they were extracted for exactly this purpose: make high-order trends evident. So maybe object-oriented code does "even more with less", thanks to libraries and such. After all, code reuse has been sold as a major winning point for objects all along.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds