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,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-13 01:09:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!pec-14-222.tnt3.hh2.uunet.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Mon, 13 May 2002 10:10:47 +0200 Message-ID: <0qsuduo0slcq8lvmapjqsues0m561159pk@4ax.com> References: NNTP-Posting-Host: pec-14-222.tnt3.hh2.uunet.de (149.225.14.222) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1021277375 19496820 149.225.14.222 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:23943 Date: 2002-05-13T10:10:47+02:00 List-Id: On Fri, 10 May 2002 14:00:50 -0500, "Randy Brukardt" wrote: >Dmitry A. Kazakov wrote in message ... >>On Thu, 9 May 2002 15:02:47 -0500, "Randy Brukardt" >> wrote: >> >>>Supporting default parameters for generic types would be (I think) a >>>whole lot simpler than 'types as objects'. Ada has default parameters >>>for generic subprogram parameters, why not types? >>> >>>Something like: >>> >>> type Count is (<>) use Natural; >>> >>>seems like it would work. Probably worth thinking about a bit. >(Warning: >>>I have made no effort to think about the ramifications of this idea!!) >> >>We already have two different words for IS: "is" and ":=", "use" would >>be a third one. (:-)) > >I know from past discussions that the ARG really does not want repeated >reserved words in the syntax. So, > > type Count is (<>) is Natural; > >is out. ":=" applies to objects, not types, and I don't think we want to >make types look like objects. I am not so sure. I think that "type Count is (<>);" is logically flawed. Here (<>) is a class of types, so Count is an object of this "type type".Thus it would be natural to have: Count : (<>) := Natural; A similar thing could be done with subprograms. And of course, we should have subprogram types! At least to reduce use of nasty access-to-subprogram objects. > "use" is used to mean "is" in >representation clauses already, so it seems to be the logical candidate. >But there may be a better syntax. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de