[2323] in java-interest
Re: interfaces are NO substitution for method pointers
daemon@ATHENA.MIT.EDU (dufourd@enst.enst.fr)
Fri Sep 29 09:15:28 1995
From: dufourd@enst.enst.fr
To: Tako Schotanus <Tako.Schotanus@bouw.tno.nl>
Cc: java-interest@java.Eng.Sun.COM
In-Reply-To: Your message of "Wed, 27 Sep 95 10:03:00."
<01BA8CC0.6EB253A0@takont.bouw.tno.nl>
Date: Wed, 27 Sep 95 20:08:03 +0100
>Except of course that you might want to dynamically assign callback functions.
>Now if somebody could explain to me how do *that* in an OO way I'd be very
>happy to hear it. ;)
Of course : you want to call SomeMethod with an argument "CallBack12".
Instead you pass to SomeMethod an instance of Object12 implementing the
method CallBack. This instance can be generated by a new Object12 or
a forName("Object12").newInstance(), right?
The pain is that you have one class file for each type of Object.
I guess that with the kind of pressure there is on the "lots of class
files" problem, it should get solved quickly.
If I had to translate Emacs to Java, I would probably write a script to
macro-generate all these classes.
JC
------------------------------------------Java, Lisp & Theater----------------
Jean-Claude Dufourd Departement Electronique,ENST Tel: +33 1 45 81 78 07
46 rue Barrault, 75013 Paris Fax: +33 1 45 80 40 36
Email: dufourd@elec.enst.fr URL: http://www-elec.enst.fr/~dufourd/jcd.html
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com