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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa18fb47ddd229a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-10 17:00:37 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Proposed change to BC iterator parameters References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 11 Dec 2003 01:00:36 GMT NNTP-Posting-Host: 63.184.105.176 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1071104436 63.184.105.176 (Wed, 10 Dec 2003 17:00:36 PST) NNTP-Posting-Date: Wed, 10 Dec 2003 17:00:36 PST Xref: archiver1.google.com comp.lang.ada:3345 Date: 2003-12-11T01:00:36+00:00 List-Id: Robert A Duff wrote: > Anyway, the key point of "limited" is that you can't copy things. The > "=" issue is a more minor one, I think. My point exactly. > Jeffrey Carter writes: >>In hindsight, it would have been better to eliminate the "limited" >>reserved word completely, and use instead >> >>type T is private; >>-- Same as Ada's "limited private" >> >>type T is private with ":="; >>-- Assignment defined; "=" not; no Ada equivalent >> >>with the capability of defining "=" for either type. > > Here, I think you're talking about regular private types in > packages (as opposed to generic formals). One idea is to say: I was thinking about both. > Unfortunately, the Ada compiler does not understand the comment, "-- For > use only in the package body!". You say above, ``with the capability of > defining "=" for either type.'' But it's not trivial to make that "=" > be the predefined one. If we had a syntax like that I described, there would be no predefined "=" for either kind of type. One can think about all kinds of constraints on types, such as the integer types you mentioned. It would be nice to have unconstrained arrays with a fixed lower bound*: type String_From_1 is array (Positive range 1 .. <>) of Character; I don't expect to see major changes of this sort. Where do you stop? Should you allow arrays with a fixed upper bound? * Ada sort of has this: type String_From_1 (Length : Natural) is record Value : String (1 .. Length); end record; -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail 10