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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b47b15fda2aeb0b2 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Two ideas for the next Ada Standard Date: 1996/09/08 Message-ID: #1/1 X-Deja-AN: 179313204 references: <50aao3$3r88@news-s01.ny.us.ibm.net> <323153E7.2CDA@joy.ericsson.se> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-08T00:00:00+00:00 List-Id: In article , Jon S Anthony wrote: >In article <323153E7.2CDA@joy.ericsson.se> Jonas Nygren writes: ... >But, as long as this particular case was used, I actually have a question >for Bob (if he is reading this...) Why didn't the generic signature for >System.Address_To_Access_Conversions include the access type? It probably should have been. It was discussed, and I think the design team basicall said, yeah, we know that it's usually best to pass in the access type, to avoid unnecessary conversions, but in this case, you're doing low-level hacking anyway, so a few extra conversions won't hurt. >> One solution to this could be to provide an 'anonymous general >> access-to-variable type', RM6.1(24), for variables to and not only >> for subprogram formals and discriminants. Perhaps one could use a >> syntax similar to T'Class and have T'Access denoting this new >> subtype. With this syntax we could have the example from above: > >I _think_ Bob Duff would agree with you, ... Yes. >... but I still don't see this >as a problem so would not agree with it. In fact, I see the current >situation of not having this as a _good_ thing not just a "shrug". The examples we're discussing are not a real problem, because you can avoid the conversions by simply using the same type, and pass it around to generics. But when you use a lot of access-to-class-wide types, it *is* a problem, because you *have* to declare a bunch of different access types. Conversions in the upward direction are a real pain, IMHO. - Bob