[ale] Ale Inc.? (was RE: [ale] surviving sans work

Joseph A Knapka jknapka at earthlink.net
Thu Jan 31 10:12:53 EST 2002


Geoffrey wrote:
> 
> Joseph A Knapka wrote:
> 
> > And if it could, Java would be a bad choice, IMO (I say this with
> > several years of Java development experience). It's a horrible
> > language, well-marketed by Sun and hangers-on.
> 
> Care to clarify?

Yes. Note that all of what follows is my personal opinion,
and that in general, I'm highly in favor of people using
whatever tools they find useful.

IMO, Java makes seriously braindamaged decisions about
typing and classing, including what types and classes exist,
when to check them, and how to convert between them. Java is
billed as a strong, statically-typed language, with all the
advantages that implies (there really aren't many, though five
or six years ago I was a static-type-checking zealot). However,
for some bizarre reason the library designers chose to
build large portions of the Java runtime library -- including,
most frustratingly, the standard container classes -- with
interfaces specified in terms of class Object, from which
all other classes are derived. The practical result of this
is that this allegedly strong, statically-typed language is
in fact *not able* to find a huge category of static type
errors, and thus we must always pay the cost of runtime
type checking, at last where class instances are concerned,
even if our code is 100% type-correct. Furthermore, since it's
not possible to define implicit conversions between classes
as in C++, practically every line of code I write contains
some ugly explicit type conversion (get an object out of
a Vector, cast it to the right class...). If the Java
designers had seen fit to include a genericity mechanism
(a la C++ templates) in the language, that wouldn't be so
bad, since one could trivially adapt the standard containers
to have the right interface for whatever class one wanted
to put in them... but they didn't, so you have a choice
between explicit casts everywhere, or manually writing
your own wrapper every time you want a different kind
of container, which is just annoying. Plus, due to the lack
of multiple inheritance (about which we could have a nice
toasty flamewar, but personally I'm in favor of it) you
can't use mixin classes. So to summarize, Java combines
the worst aspects of static typing a la C++ and weak typing
a la Tcl or VB. They just got it Wrong. I'd rather chew my
leg off than maintain Java code, which sucks, 'cause I
have a lot of Java code to maintain and the leg surgery is
starting to get expensive.

> > If you like the perl/GTK interface, and you're productive in it,
> > and it does everything you want, then IMO you should keep
> > using it (I say this as a guy who hates Perl above practically
> > every other language I've every worked with)

I dislike Perl for the same reason, essentially, that
I like Python: I can't figure out what I was trying
to do in Perl code I wrote yesterday, whereas I can
usually understand other people's Python code after
one or two readings; and the two languages are pretty
much on a par as far as features go.
 
> It's not Java or Perl, what's your preference?

At the moment, C or C++ (another horrible language, but
one I'm on much better terms with) for the gotta-be-
fast bits, and Python for the glue. Also I'm beginning
to investigate Zope for web apps, it looks *very*
cool. I wrote a student-management app for a local
karate school here in El Paso (paid for in karate
lessons, not cash :-) in Python/Tk. Then the client
wanted a WWW interface; it took me literally less than
8 hours to completely implement the WWW interface by
wrapping the existing business logic in Python CGI scripts
instead of Tk code. Tonight I'm gonna redo it again
as a Zope extension :-) primarily for performance
reasons (loading the student DB for every invocation
of a CGI is a real drag).

Cheers,

-- Joe
"I should like to close this book by sticking out any part of my neck
 which is not yet exposed, and making a few predictions about how the
 problem of quantum gravity will in the end be solved."
 --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list