[2117] in java-interest

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

interfaces are NO substitution for method pointers

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Mon Sep 25 21:36:43 1995

Date: Mon, 25 Sep 1995 12:33:02 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: java-interest@java.Eng.Sun.COM

OR, somebody please tell me why I am confused.

It has been suggested that using interfaces is a substitution for
method pointers.  How's that?  How would I implement EMACS keymaps
using interfaces?  Or, if not interfaces, a class with an action
method, that you subclass for each callback.

I would have to create N classes for each entry in an Emacs keymap
that runs a difference command.  I really don't want to create N
classes for N callbacks, especially when EACH OF those callbacks
REALLY wants to be executing in the context of another class (say, the
EditorBuffer class).  No thanks.  I want method pointers.

Is there a security issue that I am not understanding?

Regardless of whether Java is going to have method pointers some time
in the future, please don't tell me that interfaces or "action"
classes are a good substitution.  That's ludicrous.
-
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