[1766] in java-interest

home help back first fref pref prev next nref lref last post

Re: A few queries...

daemon@ATHENA.MIT.EDU (Michael Lorton)
Sat Sep 16 20:28:42 1995

Date: Fri, 15 Sep 1995 10:48:54 -0700
From: Michael Lorton <mlorton@eshop.com>
To: mason_l@ee.uwa.edu.au
Cc: java-interest@java.sun.com
In-Reply-To: <01BA83B3.200B3520@s158.dialup.uwa.edu.au> (message from Llew Mason on Fri, 15 Sep 1995 21:35:04 +-800)



> I've been evaluating Java for the past few days and have a few queries =
> on the language. (keep in mind that I have been using the NT 1.0a3 =
> release and haven't seen the development kit)  Please correct me if =
> anything I have stated below is incorrect.
> 
> 1)   Pass-by-value vs pass-by-reference vs pass-by-const-reference
> 
Yeah, constancy was a curious omission from the language.

> 2)   Meta-classes (template classes for those unfortunate C++ people)
> 
>   There seems to be no way to implement meta-classes within Java.  The =
> interface mechanism allows for class methods to operate on any class =
> which implements a particular interface, but cannot guarantee the =
> homogeneity of instantiated classes.  This makes usage of classes like =
> Vector unsafe (not to mention inelegant) since all elements need to be =
> typecast to the required type upon extraction.


extend Vector and create a class that takes an object of class Class
as a argument to the constructor and uses that Class to test every
insertion.  This solves the type-safety problem (or at least moves the
exception to earlier in the run-time).  You could "manually" template
the Vector class to do the overloading for you, but yes, inelegant.

> 3)   Operator overloading

Jeez, please don't start that one again.  Let us just say that a
majority seems to agree with the decision as made.

> 4)   AWT class package DisplayItem class

Seems to be changed in Beta.

> see no reason why Java couldn't become as popular as C++.

Me neither.


> Llew Mason

M.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post