Hi,

I know this thread is becoming a phylosophical one, with a Mac vs PC style.
Don't look at it that way. I just want to prove that Java is welcome into the
Palm, it is an advance, and if it meets the ever standing requirements of
space-saving for the Palm device, it will contribute very much to the Palm
world. The proposed API for Java 2 Micro-edition is very ambitious, and might
just lift the Palm to higher flights. Having said this, I'll continue my defense
of Java:

Steven Todd Harris wrote:

> Good style guidelines? Are you kidding.Java programmers still use one letter
> variable names.
>

I was talking about the API, not general programmers. Bad programmers are like
fungus. They grow everywhere.

> really, smalltalk has 5 key words. Did you ever count Java's?

Java has many more keywords. That's not bad. It doesn't mean it has a complex
syntax.

> Did you ever write things in Smalltalk and then write them in Java and
> compare the
> fact that it takes as many as ten times the number of lines of source to do
> it?

That's a lie, if you code properly in Java. I've coded in both languages, I know
what I'm saying. Of course, if you want to do a+=3 and code like this:
    a++;
    a++;
    a++;
No comments...

> What is the class of class in Java?

java.lang.Class. Pretty obvious, hein?

> Why are there two integers?

To take advantage of native types. It's easier to code a+b, than a.add(b), and
it has performance benefits. This is explained by Sun. It also explains why
there are more keywords than in smalltalk. It has classical strucutured
programming constructs, like for cycles, while cycles. They are practical
deviations from 'pure OO', and the discussion of whether they are good or not
approaches philosophy. Let's not step into that ground.

> how many lines does it take to do a perform?
>
> in smalltak it is
>
> anInstance perform: #aMethod.

In Java, it's:
    anInstance.getClass().getMethod("aMethod", null).execute(anInstance, null);

That counts as one line. You'd need two more for the try and catch block to
handle exceptions, one of the most beautiful features of the language. I don't
count them, as it is a feature absent from Smalltalk.

> If you want to write a method that extends a "Primitive Type" where do you
> do it?

You don't, by definition. But you can't do it either in Smalltalk, as there are
no primitive types. If you want to extend the non-primitive java.lang.Integer,
as you do in Smalltalk, you are free to do so.

I hope that by now you are abandoning the stupid notion that Java is a hack on
top of C. Geez! For your happiness, I also like C 1000 times more than C++, and
think C++ is a patch on top of C. But Java! Earth to Steve ... Earth to Steve
...

Cheers,
--
Sergio Carvalho
---------------
[EMAIL PROTECTED]

If at first you don't succeed, skydiving is not for you


Reply via email to