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,85d5a13738392342 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Unknown discriminants with nested records Date: Thu, 16 Jun 2011 23:03:37 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <1e197c14-a2ff-4867-85be-fda06a10e37b@a7g2000vby.googlegroups.com> NNTP-Posting-Host: 2eb76716e28f6de8f03a7dbcc9420d80 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: b51e870bd87f3aaa03f3899eeb8ef7ba X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=b51e870bd87f3aaa03f3899eeb8ef7ba X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:20876 Date: 2011-06-16T23:03:37-07:00 List-Id: On 06/16/2011 05:39 PM, Adam Beneschan wrote: > > The (<>) was intended to define types with unknown discriminants; I thought it was initially created to fix the problem with generics, where in Ada 83 you could have generic -- G type T is limited private; ... package G is ... end G; package body G is ... V : T; ... end G; package I is new G (T => String, ...); and it wasn't caught when you would like it. In Ada 95 and later, you have to have (<>) on the formal to have an indefinite actual, and the generic cannot have an uninitialized object of the type; without (<>), the actual must be definite; and the problem is caught when compiling the instantiation. -- Jeff Carter "Many times we're given rhymes that are quite unsingable." Monty Python and the Holy Grail 57