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,4dcea36626746792 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-15 01:11:56 PST Date: Tue, 15 Apr 2003 10:10:57 +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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3e9bbec7$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1050394311 128.178.76.8 (15 Apr 2003 10:11:51 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:36146 Date: 2003-04-15T10:10:57+02:00 List-Id: 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