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-13 01:48:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!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: Generic default parameters Date: Mon, 13 May 2002 10:49:12 +0200 Message-ID: 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 1021279680 20566087 149.225.14.222 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:23945 Date: 2002-05-13T10:49:12+02: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 .. 5 6. A more liberal matching of actual subprograms against formal ones. If some parameters of the actual subrogram have defaults, then they can be absent in the formal one. generic with procedure Put (Item : in Object) is <>; package Foo ... Then an instantiation with Integer_IO.Put: procedure Put ( Item : in Num; Width : in Field := Default_Width; Base : in Number_Base := Default_Base ); should be legal. 7. Incomplete instantiations: package X is new Y (<>); -- -- No actual parameters given. -- All declarations of the visible part of X -- are incomplete here in usual sense. -- I.e. if X declares a a type XX then -- type XX_Ptr is access X.XX; -- would be OK. . . . private package X is new Y (); The formal parameters which actuals are not visible in the public part, shall be only used in the private part or the body of the generic. The idea is to instantiate a generic with some private things and yet to have the instance visible. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de