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,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Warts was Re: The stupidity of all the Ariane 5 analysts. Date: 1997/08/08 Message-ID: #1/1 X-Deja-AN: 263303897 References: <33C835A5.362A@flash.net> <5scqlr$ju@news.sei.cmu.edu> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-08-08T00:00:00+00:00 List-Id: In article , Jon S Anthony wrote: >That's not nearly as bad as the one about how limited types are not >required to be passed by reference. A flaw that was continued into >Ada95 (with only partial mitigation). I would say *substantial* mitigation. I mean, if you want it to be passed by reference, export a limited private type, and make the full type "limited record". Everyone should follow this coding convention, in Ada 95: If a limited private type is completed with a record type, make the record type limited, too. I'm not sure how we could have done better, without damaging upward compatibility, and/or damaging privacy of private types. I mean, you can't say "all limited types are passed by ref", because a limited type may be completed by an integer type, and integer types are passed by value. Surely you don't suggest that the view of the type at the call site should determine whether it's passed by copy or by ref! (So that a single subprogram has multiple calling conventions.) By the way, it's not clear to me that you *want* pass-by-ref for limited elementary types, such as pointers. An earlier version of Ada 9X had limited access types (quite useful!), but they were passed by copy, if I remember. You couldn't assign them, though. - Bob