Chris said:
That is a good point. The example here was specifically chosen to
require a console-based user-interface, something that Java quite
clearly and intentionally doesn't really provide as an option. As soon
as you choose a less exotic (in modern terms, not 10 years ago) way to
get the input, Java starts to look a little better.
Nevertheless, clearly there are parts of Java that are not well-liked by
some developers. The point is, though, that if Java as a whole looks
unbearable to you, it doesn't say much that X feature doesn't look
desirable to you either. Features in Java can't reasonably be judged by
how much they look like Common Lisp.
Hmmm.... I hope it doesn't make one a dinosaur to actually have programs
that read input from users in files. The example I gave was inspired
from a filter I wrote last week which converted a list of coordinate pairs from
one coordinate system to another, so the whole program was in a loop --
using command line arguments would not suffice there. Even if the
input string came from a GUI component I find that the string is far
more naturally parsed than in Fortran or C. The advantage that Java
has here is that it has standard mechanisms for creating such a GUI
component. But it's not clear to me why we needed to lose the
much greater flexibility and convenience that we had in earlier languages.
Languages aren't a zero sum game.
Nor do I think "love it or leave it" is the only appropriate response to criticisms
of a language. There was enormous criticism of the inflexibility of the
mathematical model used in the original Java specification and this was changed
in later versions of Java. There was great pressure to add templating to Java,
and a mechanism for this is about to be released. Discussion of the issues
where users feel Java is lacking or difficult to use are surely needed if Java
is to evolve in the most productive fashion.
Personally I feel that the multi-layered intricately interconnected
classes and packages for doing I/O in Java are far more complex than
need be and perhaps more important, they require users to know far too much
of fairly abstruse details. Already there have been two major overhauls of I/O
and some areas (e.g., imaging) have developed there own special low level I/O classes.
Streams, Formats, Files, RandomAccessFile, Messages, Readers, Writers,
Buffers (of two different kinds), Channels, encodings, ....
This is not to suggest that I/O will ever be trivial, but Java has raised its
complexity to a whole new level. So generally I like working with Java. But to
me its big win is not its syntax -- it's the fact that programs work --
and fail -- consistently on all platforms.
Regards,
Tom McGlynn