<pontification>
Steve Fosdick fozzy@pelvoux.demon.co.uk writes:
- Including much more useful functionality in the standard
library (such as a GUI toolkit) which means that many more things are done in a standard way.
I actually see this as a *disadvantage*. What I like in a language is a small, compact, memorable, consistent, very standard core -- not the acres of libraries which make up the current standard Java. I'm still plodding through texts... as soon as I think I know roughly what's available, someone seems to invent more ;-)
Neill Newman neill@entora.co.uk writes:
yes, Bill Joy (the main guy who wrote Java, or oak as it was origionally called) didn't like the way in which OO was bolted on to C to form part of C++.
C++ -- tying legs onto a dog and calling it an octopus. Now where's that quote from?
I believe he also took on board the concept of garbage collection, memory management, and a clean OO design from smalltalk and other languages.
Is Java really a "clean OO design from smalltalk"? Is there a non-trivial superclass which is an ancestor of everything? int?
I would not entirely agree that the Java API is as extensive as C/C++ or other languages. There are some things that are very very dificult to achieve using Java, and what seems like a simple task in one language /can/ be very dificult in Java if it is not part of the API.
An advantage of starting with a ball of mud is that no matter how much mud you add to it, you still have a ball of mud. If you start with a diamond and add mud, you have a muddy diamond. (Paraphrasing from a programming textbook I once read.)
Alexis Lee alexis@turton.com writes:
C++ is a decent language if you know what you're doing. Think of it as a stallion, compared to Java's compliant mare. Sometimes you need to wrastle, but it always has the power. Oh, and while it will never refuse a jump, it might get both your necks broken when you fu.
Nice image. Sorry, I just wanted to quote that.
[...] This gives performance near equal to C, and (wild unfounded guess) probably much better than any loose-typed or philosophy-designed language like PHP or Scheme.
"I think PHP could become the BASIC of the next Years" -- Thies, PHP maintainer.
You actually slight Scheme very badly here, you know. Yes, you'd expect me to say that, but even so! Putting it with PHP?
I read the report today showing a scheme webserver outperforming a PHP one by 2:1... lies, damn lies and benchmarks perhaps, but PHP is really not in the same ball-park. Also, you can get strictly-typed optimised schemes. Or schemes implemented in Java (Kawa, BRL, Silk). Careful what you say when you don't know ;-)
These Java programmers of Scheme are probably trying to counteract the problems, for there are many: Java still doesn't have closures, continuations, first-class procedures...
</pontification>
<snip>
Is Java really a "clean OO design from smalltalk"? Is there a non-trivial superclass which is an ancestor of everything? int?
yes, and no ;).. everything is derived from an Object, with the exception of the datatypes (int, float, double) but there are objects which encompass these (Integer, Double, Float)
<snip>
These Java programmers of Scheme are probably trying to counteract the problems, for there are many: Java still doesn't have closures, continuations, first-class procedures...
This may be true, but how many of us know what those mean, how many of us care ;) Sz
MJ Ray wrote:
Steve Fosdick fozzy@pelvoux.demon.co.uk writes:
- Including much more useful functionality in the standard
library (such as a GUI toolkit) which means that many more things are done in a standard way.
I actually see this as a *disadvantage*. What I like in a language is a small, compact, memorable, consistent, very standard core -- not the acres of libraries which make up the current standard Java. I'm still plodding through texts... as soon as I think I know roughly what's available, someone seems to invent more ;-)
Not knowing OpenGL wouldn't stop you writing C, would it? The advantage of a huge standard library is it keeps things standardised. Instead of a zillion vendors each doing their own thing to look up, you just need to flip thru the API.
C++ -- tying legs onto a dog and calling it an octopus. Now where's that quote from?
You, I believe, although I think you got it from the Smalltalk website.
Is Java really a "clean OO design from smalltalk"? Is there a non-trivial superclass which is an ancestor of everything? int?
Largely. As an analogy, in database design sometimes one has to de-normalise a perfect database for efficiency. It's rather inefficient to store a 32 bit reference to a 32 bit number, and for chars it's much worse. Fx, "Hi World" is 8 chars (ignoring terminator). This is 8 bytes in Java, or 8*4+8 = 40 in MangleLang.
Alexis Lee alexis@turton.com writes:
[...] This gives performance near equal to C, and (wild unfounded guess) probably much better than any loose-typed or philosophy-designed language like PHP or Scheme.
"I think PHP could become the BASIC of the next Years" -- Thies, PHP maintainer.
You actually slight Scheme very badly here, you know. Yes, you'd expect me to say that, but even so! Putting it with PHP?
I read the report today showing a scheme webserver outperforming a PHP one by 2:1... lies, damn lies and benchmarks perhaps, but PHP is really not in the same ball-park. Also, you can get strictly-typed optimised schemes. Or schemes implemented in Java (Kawa, BRL, Silk). Careful what you say when you don't know ;-)
Don't be careful what you say when you say you don't know. I knew PHP had relatively c* performance, and my experience of 'conceptual' languages like Lisp or Prolog is that there's a lot of wasted effort involved. I quoted Scheme instead of Prolog primarily to bait you, and secondarily because I thought more people might have heard of it. If Scheme is nothing like either L or P I will go and hide under a rock.
These Java programmers of Scheme are probably trying to counteract the problems, for there are many: Java still doesn't have closures, continuations, first-class procedures...
Off the list, Mark, are there any instances where a task can only be done using closures, or using a closure enhances efficiency? Custom sort is the favourite example I believe, but this is usually done using a function pointer in C. Hence a closure can be simulated by passing a reference to an anonymous function, which I rather suspect Java can do. You can certainly have anonymous classes, which lends the same result.
And what the heck are continuations and first-class procedures?
Alexis
<snip>
Largely. As an analogy, in database design sometimes one has to de-normalise a perfect database for efficiency. It's rather inefficient to store a 32 bit reference to a 32 bit number, and for chars it's much worse. Fx, "Hi World" is 8 chars (ignoring terminator). This is 8 bytes in Java, or 8*4+8 = 40 in MangleLang.
hope I'm not being pedantic, but Java stores a character as 16 bytes, it uses unicode... Sz
Neill Newman wrote:
Largely. As an analogy, in database design sometimes one has to de-normalise a perfect database for efficiency. It's rather inefficient to store a 32 bit reference to a 32 bit number, and for chars it's much worse. Fx, "Hi World" is 8 chars (ignoring terminator). This is 8 bytes in Java, or 8*4+8 = 40 in MangleLang.
hope I'm not being pedantic, but Java stores a character as 16 bytes, it uses unicode...
I knew that really. <woops> It's still ridiculous to use 6N bytes to store 2N bytes of data. And before someone mentions, yes I know most of java.lang.String 's methods are native anyway and hence my example doesn't apply, but this is another instance of denormalisation for the sake of efficiency.
Alexis