From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada-Oriented GUI Date: Wed, 21 Mar 2018 09:25:10 +0100 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:51089 Date: 2018-03-21T09:25:10+01:00 List-Id: On 18/03/2018 14:33, Jeffrey R. Carter wrote: > I've written on here before that I think the traditional > register-callbacks-and-call-a-procedure GUI interface is a hack only > suitable for sequential languages, and attempted to describe my idea of > how a GUI for a concurrent language like Ada should work. Some have > expressed the opinion that such an interface is not possible. Why do you believe that event-loop architecture is better than callback one? In the latter there at least no need to have an explicit loop and more importantly it can be made type safe if callback are primitive operations of interfaces. As Randy already mentioned, your design is quite close to Windows GDK, but very different from other architectures. In any case I do not see how this responds to major challenges of GUI design, e.g. structured filtering of events (widgets swallow events and re-emit higher-level ones) or inversion when a button emits events, but it is the handler that must process them, so the case-statement or dispatching choice constrained by button interface must be in the handler code, not in the button or its descendant. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de