Subject: Re: something I would like to see in ADA 2005
Date: Tue, 15 Apr 2003 10:29:40 +0200
Date: 2003-04-15T10:29:40+02:00 [thread overview]
Message-ID: <3e9bc32d@epflnews.epfl.ch> (raw)
In-Reply-To: 3e9bbec7$1@epflnews.epfl.ch
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
>
next prev parent reply other threads:[~2003-04-15 8:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 13:22 something I would like to see in ADA 2005 Tony Gair
2003-04-10 14:04 ` Hyman Rosen
2003-04-14 14:34 ` Tony Gair
2003-04-14 15:33 ` Bill Findlay
2003-04-10 14:12 ` David C. Hoos
2003-04-10 14:24 ` Peter Hermann
2003-04-11 0:10 ` Robert A Duff
2003-04-14 14:39 ` Tony Gair
2003-04-14 15:34 ` Wesley Groleau
2003-04-14 15:41 ` Bill Findlay
2003-04-15 8:10 `
2003-04-15 8:29 ` [this message]
2003-04-14 15:40 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox