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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-15 17:57:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: Wed, 15 Oct 2003 19:59:34 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3F739C1D.4030907@attbi.com> <3F78E850.8010401@comcast.net> <3F797748.3000203@noplace.com> <834clb.uan1.ln@skymaster> <3F79EF18.7060600@comcast.net> <3F7B1076.8060106@comcast.net> <5mknnv4u96qqudrt4bd8n4t1cljp2fjlp8@4ax.com> <3F7C810E.7070100@comcast.net> <3G2dnS15r8mycOCiXTWJkA@gbronline.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:930 Date: 2003-10-15T19:59:34-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:blm0au$dkoad$2@ID-77047.news.uni-berlin.de... > So you have to go further: > > type String_In_Record (Length : Positive := 80) is > The_Body : String (1..Length); > end record; > > This would result in Storage_Error. Defaulted discriminants are not what > people usualy think about them! No, this *can* result in Storage_Error. It certainly will not in Janus/Ada (which allocates unconstrained records to size). I personally think it is a mistake to implement unconstrained records so that the above reasonable construct doesn't work -- but that is a position that is not widely held. ... > Presently this is unsolvable without generics. No, just get a better compiler. :-) (OK, it can't be solve portably, because implementations are allowed to raise Storage_Error in the above case. But implementations are *always* allowed to raise Storage_Error. So that is always a risk.) Randy.