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,2e2db8edf2656165 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.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: Sat, 24 Sep 2005 00:19:15 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1lw8oz33ao529.12ep5ay7rg4oc$.dlg@40tude.net> Subject: Re: Constructing an object Date: Sat, 24 Sep 2005 00:23:01 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: <5-GdnRjCgYZOfKneRVn-qw@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-2xtzp1xlIMRE2+LbCrTQCqlTGSxx8e0xPvR3RfOgR79qwywkJTafADFuDpW/W/8uVW4G001twCDYldi!4dYR5xC0bY94krTF3ePj9Ex6h5QoF8q2xaDt1limtGgrshNr/h05jzWJFkeEgQjXEZSuM/Z8M40/ 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: g2news1.google.com comp.lang.ada:5084 Date: 2005-09-24T00:23:01-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:f1idk7ptk100.onel9bzfn1nr$.dlg@40tude.net... ... > Yes. It must be either a discrete or access type. In the latter case the > discriminated type has to be limited. ...in Ada 95. In Ada 200Y, access discriminants are allowed on nonlimited types, but they then cannot have defaults (such discriminants cannot change after object creation, and we needed to disallow changing them via assignment). You also failed to mention that the object factory can be implemented (probably *ought* to be implemented) with the Ada 200Y Generic_Dispatching_Constructor. That takes a tag value and a dispatching function and creates an appropriate object for the tag, initialized by the dispatching function. While its primary purpose was to make it possible to implement user-defined T'Class'Input functions, it can be useful in other circumstances as well (such as construction from a menu). Randy.