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, T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29fe9a340e0d180d X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Depending on passing mechanism Date: 1997/10/18 Message-ID: #1/1 X-Deja-AN: 282348478 References: <622b4t$nhe$1@gonzo.sun3.iaf.nl> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-10-18T00:00:00+00:00 List-Id: In article , Brian Rogoff wrote: Brian, to Henry: >You post elsewhere that Ada's flaws are well known everywhere but inside >the Ada community. I think the opposite is true, lots of "flaws" in Ada, >including those mentioned in your papers, are discussed on c.l.a., but the >knowledge of Ada elsewhere is simplistic (ADA is kitchen sink language >designed by DOD committee) and I've rarely seen useful criticisms from >"outside", except for those of Ada-83 tasking. I still haven't found a >widely useful language without serious flaws. The main competitor for Ada >in its class is C++, and I prefer Ada. Matt, to Brain and Henry: OK, I think we can all agree that aliasing can break a limited abstraction. But in Ada 95 the programmer can implement the full view of a limited private type as a by-reference type, either by 1. Implementing the type as a record marked as limited, or 2. Privately implementing the type as tagged. In code, something like private type LT is limited record O : end record; end; or private type LT is tagged record O : end record; end; We could even combine these ideas: private type LT is tagged limited record O : T; end record; end; My question is, Why is this considered a "serious flaw" in Ada? Don't the implementation techniques listed above solve the aliasing problem? Perhaps the area of contention is the fact that the language doesn't require a limited private type to be implemented using a by-reference type (ie Baker's limited bank account is implemented as a scalar, fixed point type, which must be passed copy-in, copy-out). Is that the case? Can we solve that issue, by requiring compiler warnings, or a suitable invokation of pragma Restrictions? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271