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,635cd9622b25ae59 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 28 Apr 2006 14:07:18 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1146143954.169807.207080@t31g2000cwb.googlegroups.com> <1146148380.102042.119860@y43g2000cwc.googlegroups.com> <445101bf$0$11061$9b4e6d93@newsread4.arcor-online.net> <1146226568.9048.7.camel@localhost.localdomain> <1146227854.112808.257290@g10g2000cwb.googlegroups.com> <7ut4g.921904$x96.7750@attbi_s72> Subject: Re: Type safety, C++ and code generation Date: Fri, 28 Apr 2006 14:07:31 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-dv2OdXR5Ts+jpa+sm4cqQEFO9U2umIR0PpgB4DJzylrTkGf7I853/kv4xZCbFG/5R19WNu5uAxGchO0!GwnOqulXswwtRwhvSpyVNWRlcdHHsLExVrt3mKea5k0gHVEOzrhzgBOf/aFHZ6obC43u5jn0XAZR X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:3992 Date: 2006-04-28T14:07:31-05:00 List-Id: "Jeffrey R. Carter" wrote in message news:7ut4g.921904$x96.7750@attbi_s72... > brian.b.mcguinness@lmco.com wrote: > > > > One solution to the problem would be to provide a new keyword for > > defining types with no default operations. Only the operations you > > explicitly defined would be available. > > You mean like "limited private"? Right. The problem with "limited private" is the loss of numeric literals (and string literals in another use). Usually, it's been thought that the solution is to somehow provide literals for private types. OTOH, no one has ever made that work out well enough to get it into Ada, so perhaps a radically different approach is needed. But careful: the operators come with generic formal types, so there would have to be restrictions on formals that are similar to whatever is defined for types: type Int is range 1 .. 10 without operators; could not match type An_Int is range <>; since An_Int has the usual operators. (And for compatibility reasons, that couldn't change.) there would have to be new formal kinds like type An_Int is range <> without operators; to support matching for these types. (If you wanted to import the operators defined for Int, you'd need to use a generic derived type.) Randy.