Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!hplabs!hpcea!hpfcdc!hpfclp!diamant From: diamant@hpfclp.HP.COM (John Diamant) Newsgroups: comp.windows.x Subject: Re: X and Ada? Message-ID: <9740003@hpfclp.HP.COM> Date: Sun, 20-Sep-87 19:51:58 EDT Article-I.D.: hpfclp.9740003 Posted: Sun Sep 20 19:51:58 1987 Date-Received: Sat, 26-Sep-87 00:53:07 EDT References: <64@kvasir.esosun.UUCP> Organization: HP, Fort Collins, CO Lines: 44 > >*Any* toolkit is going to depend on the use of call-back functions. > > I don't agree with this. It bothers me that X has two different > mechanisms for sending messages when it would considerably simplify > things if only one were used. The X event mechanism is sufficient > to handle all the message passing requirements that the callback > mechanism handles. This is true, I think. They are both turing equivalent mechanisms. You're also probably right that having two different mechanisms complicates things, but the question still remains which one is better. > I think that X events should be extended and > generalized so that they would allow events generated by toolkit > gadgets to be handled in the same way that normal X events are > handled. Personally, I would prefer the opposite direction. I prefer callbacks, because it places the procedural burden on the toolkit instead of the user/programmer. I find it very appealing that I can declaratively state the times in which my callbacks are to be executed, and not have to worry about passage of control. > Does anybody know why X has two different kinds of message passing > mechanisms? Couldn't we just get rid of call-backs? Does anybody have > any ideas on what the "right" message passing mechanism for X should be? I suspect that the reason is simply that others had the same ideas that I do about the implicit control information achievable through callbacks, and chose to implement it that way. I too, would like to see only one mechanism for message passing, but I would rather it be callbacks. Multiple callbacks for the same event have to be supported, of course, for this to be meaningful. > -- > Bruce Karsh > {uwvax,ihnp4}!nicmad!karsh John Diamant TSBU UUCP: {hplabs,hpfcla}!hpfclp!diamant Hewlett Packard Co. ARPA Internet: diamant%hpfclp@hplabs.HP.COM Fort Collins, CO