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 X-Google-Thread: 103376,4dcea36626746792 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-15 01:40:32 PST Date: Tue, 15 Apr 2003 10:29:40 +0200 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: something I would like to see in ADA 2005 References: <6a90b886.0304100522.2ebf68b2@posting.google.com> <6a90b886.0304140639.4ee1abfb@posting.google.com> <3e9bbec7$1@epflnews.epfl.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3e9bc32d@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1050395437 128.178.76.8 (15 Apr 2003 10:30:37 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.mailgate.org!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:36147 Date: 2003-04-15T10:29:40+02:00 List-Id: By the way, take a look at: http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00250.TXT?rev=1.5 It is a proposal to make protected types extensible (as tagged types, not generics). I tried to implement that in GNAT, but I was not able to do it. :( Rodrigo Rodrigo Garc�a wrote: > Tony Gair wrote: > >>> How would tasks help? Task types are no more generic than protected >>> types. If you want genericity, you have to wrap it in a package. >> >> >> >> Maybe I can use a generic package, but I would like to declare a >> protected type the same way I declare a package or a task. > > > You can. I suspect you are only using "single protected" declarations > in your code... but nothing prevents you from writing: > > protected type Resource (I : in Positive) is > ... > end Resource; > > And then you can declare objects of type "Resource" even with a > discriminant to customize them. Is that what you meant by genericity? > >> I disagree with the statement that tasks are no more generic than >> PO's. > > > I do not. > >> For instance try declaring a generic protected object. > > > Try declaring a generic task if you can ;) > > Rodrigo >