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,f7a9613bbc2bd8c9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-10 09:38:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!news-feed.ifi.uio.no!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Generic default parameters Date: Fri, 10 May 2002 16:38:30 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1021048710 21638 129.241.83.82 (10 May 2002 16:38:30 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 10 May 2002 16:38:30 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:23858 Date: 2002-05-10T16:38:30+00:00 List-Id: On Fri, 10 May 2002 16:22:50 +0200, Thomas Wolf wrote: > > It seems I'm not alone with these ideas... so let's summarize > and see if we can get a halfway decent proposal for the ARG > out of the discussions: > > Ada 95 lacks features for: > > 1. specifying a default type for generic formal type parameters > > The idea would be to allow something like > > generic > type Something is range <> := Natural; > > and if an instantiation does *not* supply an actual for > 'Something', 'Natural' will be taken. I actually like that Ada95 doesn't allow a default value, and I don't understand what the gain is in a default value. Expecially not for generic pacakges. If one want a default value why don't just do: package Some_Package is new Some_Generic_Pacakge (Data_Type => Some_Default_Type); in a package and use this? Preben