[3063] in java-interest

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

object-oriented feature not supported: why??

daemon@ATHENA.MIT.EDU (Andruid Kerne)
Sat Oct 28 03:54:15 1995

Date: Sat, 28 Oct 95 02:26:36 EDT
From: andruid@SPARKY.CS.NYU.EDU (Andruid Kerne)
To: java-interest@java.sun.com


its very nice that there is a class Class, and that for any 
objectX of class ObjectX, you can say objectX.getClass();
Sometimes you'd like to be able to use that information to make a copy
of the objectX.  Assuming there is a constructor,

	ObjectX(ObjectX clone) { <whatever> }

Then if Java is an object-oriented language, you'd like to be able to say

	ObjectX	newObjectX = new objectX.getClass()(objectX);

However, the compiler says

	'new(...)' not supported.

Are there any plans to support this kind of construction??
This is the sort of litmus feature which would bring the language up
from the realm of C++ into something much cleaner.

-- 
Cheers,

Andruid Kerne
NYU Media Research Laboratory
	--and also--
   Creative Media Cauldron

http://c4dm.nyu.edu/andruid/

The distinctions between artists and engineers -- between content
developers and programmers -- are entirely artificial.  
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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