[2047] in java-interest
Re: Fn ptrs & ... callbacks!?
daemon@ATHENA.MIT.EDU (Gary Aitken)
Fri Sep 22 11:44:32 1995
Date: Fri, 22 Sep 1995 06:38:35 -0700
From: garya@village.org (Gary Aitken)
To: sw@tiac.net (Steve Witham), java-interest@java.sun.com
In-Reply-To: <199509220328.XAA17676@zork.tiac.net>
>>It's also a problem for handling callbacks from GUI controls.
>
>I thought Java got rid of callbacks by having threads...didn't it?
>Callbacks are just a dumb, inside-out way to implement threads.
>Why try to immitate them in a language that has real threads?
Not true. Callbacks are orthogonal to threads. If you always knew what
object & method you wanted to execute, and it was constant, that might be the
case. But you don't, and it isn't. Even if you start a new thread to do what
you would do in the callback, you need to know what code to execute for the
callback. A callback (specifically, a callback specified by an object /
function pointer pair) tells you *which* code to execute, and what object to
execute it for, in the thread.
Gary Aitken garya@village.org
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com