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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c46082cf4d3df7b2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: ANN: Ada industrial control widget library v1.0 released Followup-To: comp.lang.ada Date: Thu, 17 Feb 2011 14:02:03 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Thu, 17 Feb 2011 13:02:48 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="w8g++bW4v3KH0+SqtoCNSw"; logging-data="368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ei8sb/20xuJ4J7hdty6z+" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:G1HsAj+UrodNX9jIz+GZzSqMFog= Xref: g2news2.google.com comp.lang.ada:18304 Date: 2011-02-17T14:02:03+01:00 List-Id: Dmitry A. Kazakov wrote: > On Wed, 16 Feb 2011 11:45:13 +0100, Alex R. Mosteo wrote: > >> (snip) > > I tried a bit by defining interfaces of drawable layers. I intentionally > didn't make layer a GObject for this reason. But that was the easy part. > >> And I wonder how/if many access types would be needed. > > Lots, because GUI objects involved do not have their life times bound to a > static scope. Objects are created and put into some container (e.g. > widget) of class-wide instances. Ada cannot this without access types for > many reasons. Similarly when an object is referenced, you need to be able > to return it by-reference from a getter/setter function. By-reference > result was ditched in Ada 2005 in favor of meaningless and useless > limited-valued functions. There are other issues too, like dispatching on > bare tags (generic dispatching constructor does not really work), > immutable results (that is when you reference a limited element of an > immutable container, the subtype of the result must be immutable. But when > the container is mutable, the result is mutable too. C++ solves it by > overloading, but I don't like that.) Thanks, this is the kind of stuff that goes over my head, and where I can really use other's knowledge. Instructive, even if it the subject is purely hypothetical at this time. Alex. > I think it is possible to get rid of access types in GUI, if ARG > considered this as a goal and changed the language accordingly. Nowhere in > GUI objects are referenced without their containers and there is always a > dedicate owner of each object.