|
|
Log in / Subscribe / Register

Java not that bad...

Java not that bad...

Posted Jul 30, 2004 8:51 UTC (Fri) by lacostej (guest, #2760)
Parent article: Paul Graham on great hackers

I agree with many points of the article, but am I the only one to think that some nice things can be achieved using Java? Or are the other ones afraid to speak, given the consensus in the first comments? :)


to post comments

Java not that bad...

Posted Jul 30, 2004 10:16 UTC (Fri) by dh (subscriber, #153) [Link] (4 responses)

No, you are not.

Once I switched a project from Python to Java: Better syntax,
precompilation and therefore syntax check before it is run, faster
execution, generally enhanced "nicelyness". Ok, it was back in 1997, but I
never regretted that step. The Java incarnation of the project is up and
healty until today - and will be for a long time (I hope).

I personally do *not* like python at all. Might be because I think
interpreted scripting languages to be always a bad choice for huge
projects - while they are second to nothing for smaller tasks!

Best regards,
Dirk

Java not that bad...

Posted Jul 30, 2004 14:58 UTC (Fri) by mikesalib (guest, #17162) [Link]

You know, Python will catch syntax errors at compilation. There are other errors (like mistyping a variable name) that C compilers do catch statically that Python only catches at runtime, but those aren't syntex errors. Looking back at all the bugs I've introduced in all the code I've ever written, none of the ones that mattered would have been caught by a C compiler. Perhaps your experience has been very different. Of course, much of my code had functional tests associated with it, which makes it a lot easier to quickly shake out the silly errors that C compilers catch but Python doesn't.

> I personally do *not* like python at all. Might be because I think
> interpreted scripting languages to be always a bad choice for huge
> projects - while they are second to nothing for smaller tasks!

Um, why do you "*not* like python at all"? I don't think its because Python is an "interpreted scripting language" because:

1. There are no Python implementations that are interpreted; they all compile Python code into code for a Virtual Machine, just like the vast majority of Java implementations. The VM code is "interpreted" in a sense, but exactly the same thing is true of Java code.

2. I have never seen an objective definition of the term "scripting language" and would be delighted if you could provide one; the closest I can come up with is that scripting languages have VM implementations that start up quickly enough to make running small programs from the command line feasible. That criteria includes Python and excludes Java, but I doubt its what you had in mind. In any event, having a fast VM hardly seems like a great deficiency.

I don't understand the line you're trying to draw between Python and Java at all; perhaps what bothers you is that one has static typing while the other has dynamic typing? To be fair, I don't think one can say that Java's type system is static given that it allows downcasting to Object and back...

Java not that bad...

Posted Jul 30, 2004 15:33 UTC (Fri) by NAR (subscriber, #1313) [Link] (2 responses)

Once I switched a project from Python to Java: Better syntax, precompilation and therefore syntax check before it is run

Those syntax checks would be useful if Java would have templates. But it doesn't have (currently) so you have to cast a lot and even though there are static type checks you still end up with lots of ClassCastExceptions during runtime - not much of an improvement over Python or Perl.

faster execution

Really? It takes ages to start the Java VM and it starts with occupying 60MB of RAM - and the program hasn't done anything yet.

Bye,NAR

Java not that bad...

Posted Jul 30, 2004 16:03 UTC (Fri) by lacostej (guest, #2760) [Link] (1 responses)

Those syntax checks would be useful if Java would have templates. But it doesn't have (currently)

You have generic coming with Java 5.0 (aka 1.5).

so you have to cast a lot and even though there are static type checks you still end up with lots of ClassCastExceptions during runtime - not much of an improvement over Python or Perl.

You can dynamically check the type of your class before casting (instanceof).

Those problems are developer errors anyway, and you can always use wrapper objects to enforce use of certain types if you need.

I hardly have ClassCastExceptions during development, because I make sure to adapt my coding to the limitations of the language.

Really? It takes ages to start the Java VM and it starts with occupying 60MB of RAM - and the program hasn't done anything yet.

It depends of the program and its uses. On my machine i start tomcat in less than 5 seconds. I don't consider that to be a problem. Especially as I don't start it often.

I don't mean to preach Java. There are things I don't like with it. It's far from perfect. It's history has been strange: targeted to program appliances (e.g. washing machines, ...) then born on the web (applets), made a (unsuccesful) approach with desktop programs, with now a focus on server side. It's "Learn once, Fit everywhere" is too monopolistic, and it's lack of support with external techno is s*cking big time (COM integration anyone?), and deployment problems (ClassLoader issues) are a pain.

But it's a nice tool, and it solves some problems very well...

Java not that bad...

Posted Jul 30, 2004 20:44 UTC (Fri) by davidw (guest, #947) [Link]

"I hardly have ClassCastExceptions during development, because I make sure to adapt my coding to the limitations of the language."

Which is exactly Paul Graham's point.

Java not that bad...

Posted Jul 30, 2004 10:38 UTC (Fri) by davidw (guest, #947) [Link] (3 responses)

No, java certainly has its place, but I deeply resent having it shoved down my throat by a billion dollar marketing machine.

I also don't like the fact that it doesn't want to play with anything that's not java.

Java not that bad...

Posted Jul 30, 2004 11:47 UTC (Fri) by coriordan (guest, #7544) [Link] (2 responses)

Greasing the sides of the pit to prevent escape is all part of the java trap.

"If you make decisions about software -- or anything -- based solely on short-term cost and benefit, someone with a longer view can easily manoeuver you into a trap from which it is hard to escape." quote by same author, different source.

Java not that bad...

Posted Aug 5, 2004 9:34 UTC (Thu) by halla (subscriber, #14185) [Link]

I rather like java -- I don't have to worry about peformance hits by
making things virtual for every method, I have packages, don't have header
files, explicit interfaces, garbage collection, a quite clear syntax and
so on. All nice to have. And native compilation and relatively easy
linking to existing C/C++ code.

On the other hand, I find I don't care all that much, in the end, whether
I do Qt programming in Java or in C++. The C++ annoyances are something to
shrug off and then continue coding. The Java advantages are not compelling
enough to start actually using it in real projects like Krita, even though
gcj, classpath and qtjava are just about mature enough for that.

Java not that bad...

Posted Aug 7, 2004 18:16 UTC (Sat) by nix (subscriber, #2304) [Link]

What RMS doesn't say in there is that this is more a `VM with bad FFI trap' than anything else.

There is an `Emacs trap' in exactly the same way (except that it's free software, so you could add an FFI to it if you wanted to: the Emacs trap's sides are not greased).

Java not that bad...

Posted Jul 30, 2004 22:38 UTC (Fri) by marduk (guest, #3831) [Link]

I don't think he was criticizing the langauge. I think he was merely contrasting hackers' enthusiasm of it versus others.


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