Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment High-level language apps are more maintainable (Score 1) 372

I've seen a few posts on this topic implying that "well sure, maybe you can write an app in Lisp in less time and with similar performance, but it's not going to be as maintainable as a Java/etc app."

There is zero evidence to back up the notion that a Lisp (e.g. CLOS) app would be less maintainable. Of course, there's not a lot of evidence either way, but there's at least a little evidence that it might be more maintainable:

http://www.spr.com/library/0langtbl.htm

This table shows that CLOS requires fewer lines of code (LOC) per function point than Java, in other words a typical CLOS app will require fewer LOC than an equivalent Java app. This data roughly jibes with the LOC results from the NASA/JPL study. This makes CLOS a "higher-level" language than Java.

Anyway, apps written in higher-level languages are easier to maintain than apps written in lower-level languages, simply because there is less code to worry about. Less code to do the same task also usually means that there is less code duplication, which is a common source of bugs. Thus, we would expect that a CLOS app, on average, would probably be easier to maintain than a Java app. (Yes, there are other factors in what makes a language more or less maintainable, but high-levelness is one of the few that is actually measurable.)

Granted, the SPR languages table is rather coarse-grained... apparently a lot of the levels for languages were extrapolated from other languages based on language features. (e.g. I think Java probably deserves a slightly higher language-level rating than C++, but then again Java lacks some things like genericity which might partly offset its LOC gains from automatic memory management/etc versus C++. Same goes for Scheme deserving a higher level.) But still, the table seems to be roughly accurate from my experience with programming various languages, and it's the best data we've got. It would be great if better and more detailed studies could be done comparing languages for developing (and maintaining!) larger, real-world apps, but this type of research is difficult and expensive, so it never seems to get done. :-(

Regarding complaints about the NASA study again... same goes for tiny apps versus huge apps. The jury is still out on whether statically-typed (Java/C++/Fortran) or dynamically-typed (Lisp/Smalltalk/Python/Ruby) languages scale better to huge apps. My personal feeling is that dynamically-typed languages scale better, but I don't think there's any real data proving either case. (Something like CLOS in particular with its powerful meta-programming capabilities I think would start to seriously crush Java in terms of maintainability for enormous apps.)

(By the way, I'm mostly a big Smalltalk fan, but I have a lot of respect for Lisp and its variants. I do work with Java too, but I don't find it particularly inspiring. ;-) See http://squeak.org for a cool, free, open-source (including the VM!) Smalltalk that runs on most any platform.)

As for a prediction of where Java will be in 30 years... my guess is it'll probably be around quite awhile, having a life-cycle similar to COBOL. Java and COBOL are similar in a lot of ways... neither language is revolutionary in terms of fundamental language features (as opposed to Lisp or Smalltalk), but both had good support for development of business-related apps, and gained a lot of momentum as a "standard"...

Slashdot Top Deals

All constants are variables.

Working...