[6583] in java-interest
Rejected by Custodian
daemon@ATHENA.MIT.EDU (PM_SMTP_RGW)
Thu Apr 4 13:14:43 1996
Date: Wed, 3 Apr 1996 17:02:52 U
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: PM_SMTP_RGW <PM#u#SMTP#u#RGW@QMSMTPGW.MUGU.NAVY.MIL>
To: Multiple recipients of list JAVA-INTEREST
<JAVA-INTEREST@JAVASOFT.COM>
Mail*Link(r) SMTP RE>Take Sun's Java hype with a grain of salt.
yes, take all hype with a heaping pile of salt...
> I think Sun got a little too cute when they decided to make Java "better"
> and "simpler" than C++.
i agree. there are some really practical and important things missing.
still, i'd rather have something too cute than... whatever you'd call C++...
'monstrosity' comes to mind i guess... ;-)
> Weirdest thing I've noticed so far about Java is Sun's claim that there
> are no pointers in Java. It seems more like everything is a pointer in
> Java. If you declare an object variable and fail to use the 'new'
> operator you get a null pointer exception. Sounds like pointer to me. Why
> does 'new' exist in a laguage without pointers in the first place? Why
> can't you simply declare an instance like this?
i think you're confused on this point. of course, the java language's use
of things like "null _pointer_ exception" doesn't help much... but
anyway... yes, java passes all non-basic types (objects) by reference.
however, these references are absolutely _NOT_ the same thing as C++
pointers! you can't take a java object reference and access anything in
memory using that 'pointer'. unlike C++, where you can say "*((char*)-1)
= 0;" (which will probably crash your application), you can't access
arbitrary byte(s) at a particular machine address in java. and, of
course, there are (*much*) worse things you can do with C++ pointers than
simple GP faults... try HEAP and/or STACK CORRUPTION for starters.
luckily, none of these bad, bad things can happen with java 'pointers'...
because they aren't 'real' pointers.
> Color myColor(33, 66, 99);
i agree it would be nice to be able to do this.
but what about objects where you don't have any constructor arguments.
does "XYZ xyz;" declare a reference and "XYZ xyz();" declare an instance?
sounds nice to me!
i think arthur van hoff gave some (rather convincing) excuses why this
wasn't done (some time ago, on this very mailing alias).
> For me, Java is undeniable useful because of it's portability, but it's
> claims to be a superior language is just a load of hype.
C made really good sense a while ago. it was a good "portable assembler".
but C++ makes far less sense to me. since it's an object oriented
language based on C, C++ therefore must be an "object-oriented portable
assembler". i don't know about you, but that concept doesn't make much
sense to me for writing applications. doing systems programming?
absolutely! but apps would be better written in java.
in general, i try to ignore questions of this form:
"is language X 'better' than language Y?"
i'm convinced that the question doesn't even make sense. better FOR WHAT
PURPOSE?? every language has it's advantages and disadvantages. you can't
say something like "C++ is better than Perl" and actually be making any
sense at all. Perl is REALLY GOOD at solving a limited set of problems.
C++ is targeted at a whole different set of problems. same with java.
C++ has its place (in operating systems and time-critical applications,
for example). the internet is not that place.
>
> John Aronson
>