[PLUG] Is Java Still a Good Development Choice?

Jason Van Cleve jason at vancleve.com
Wed Sep 29 10:22:02 UTC 2004


Quoth Ovid, on Tue, 28 Sep 2004 16:04:20 -0700 (PDT):

>     FileInputStream fstream = new FileInputStream(args[0]);
>     DataInputStream DataInputStream in = new DataInputStream(fstream);
> 
[snip]
> 
> Before I can even *think* about reading the lines from a file, I have
> to instantiate object from two different classes!  That's pretty
> annoying and is grunt work.  Given that many argue that programmers

"Two different classes!"?  :)  Is that really so bad?  Those two stream
classes are actually a good example of the balance Java achieves between
simplicity and flexibility.  FileInputStream knows how to read local
files at a byte level, and DataInputStream knows how to translate those
bytes into more useful things.  If they were the same class, then the
functionality in DataInputStream could not be applied to other types of
lower-level streams, as for reading from a socket, for instance.

Incidentally, it's common to combine those two lines into one:

DataInputStream in = new DataInputStream(new FileInputStream(args[0]));

> opening up a socket in some code that shouldn't do that.  She doesn't
> have to worry about the programmer forgetting to check to see if
> system calls are successful.  In short, Java is a fairly safe, heavily
> monitored playground.  For some businesses, that's perfectly
> acceptable(and even required.)

Right, that's part of its power.  By eliminating all those stupid
pitfalls, the programmer can focus more on good design, which is what
OOPLs are all about.

> Personally, I can't say that I'm fond of Java.  It's hybrid
> procedural/OO structure causes a lot of problems,

You must be thinking of C++!

>  Perl, Ruby, Smalltalk, etc.  They will *crush* the Java programmer in
>  terms of

Mmmmm, that too may be an overstatement.  For a large-scale app', I
serious doubt Perl could hold a candle to Java.  It might take an early
lead, but as the design takes on complexity, Perl will become buggy and
incomprehensible where Java will not.  Java is relatively bugless. 
Smalltalk may do as well, but it's been a while since I've used that.

The thing with Java is, if you know what you're doing, you can create a
very coherent, easily maintainable system of any size.  Perl is good for
a fast hack, but you have to think about the cost of maintenance.

--Jason V. C.

--
My other computer is your IIS server.




More information about the PLUG mailing list