comp.lang.ada
 help / color / mirror / Atom feed
* something I would like to see in ADA 2005
@ 2003-04-10 13:22 Tony Gair
  2003-04-10 14:04 ` Hyman Rosen
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Tony Gair @ 2003-04-10 13:22 UTC (permalink / raw)


I would like to see generic protected types in ada 2005.

For example I have had to write seven , very similarly functioning
protected types to perform the same database functions using the AVL
trees of the booch components. They protected types save their data
automatically but why on earth did I need to write seven (and debug !
and maintain! eek).

I think protected types remove a lot problems and save writing tasks
but in this case the task probably should have been used just to
maintain the genericness ( or genericisity), but this would have been
at the cost of the solid robustness provided by protected types.

Are we too late to have our requests considered by whoever makes these
decisions ?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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-10 14:12 ` David C. Hoos
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Hyman Rosen @ 2003-04-10 14:04 UTC (permalink / raw)


Tony Gair wrote:
> I would like to see generic protected types in ada 2005.

I don't know Ada, but isn't it possible to declare a
protected type inside a generic package? If so, doesn't
that do what you need?




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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-10 14:12 ` David C. Hoos
  2003-04-10 14:24   ` Peter Hermann
  2003-04-11  0:10 ` Robert A Duff
  2003-04-14 15:40 ` Stephen Leake
  3 siblings, 1 reply; 13+ messages in thread
From: David C. Hoos @ 2003-04-10 14:12 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway

> maintain the genericness ( or genericisity), but this would have been
Actually it's genericness or genericity.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-10 14:12 ` David C. Hoos
@ 2003-04-10 14:24   ` Peter Hermann
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Hermann @ 2003-04-10 14:24 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway

In article <mailman.10.1049983986.760.comp.lang.ada@ada.eu.org> you wrote:
>> maintain the genericness ( or genericisity), but this would have been
> Actually it's genericness or genericity.

generosity :-)

-- 
--Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--http://www.csv.ica.uni-stuttgart.de/homes/ph/
--Team Ada: "C'mon people let the world begin" (Paul McCartney)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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-10 14:12 ` David C. Hoos
@ 2003-04-11  0:10 ` Robert A Duff
  2003-04-14 14:39   ` Tony Gair
  2003-04-14 15:40 ` Stephen Leake
  3 siblings, 1 reply; 13+ messages in thread
From: Robert A Duff @ 2003-04-11  0:10 UTC (permalink / raw)


tony_gair@yahoo.co.uk (Tony Gair) writes:

> I would like to see generic protected types in ada 2005.

Please explain why generic packages (containing protected types), as
suggested by Hymen Rosen, do not suffice.  Please also explain why
protected types are special -- why shouldn't we have generic types in
general?

> For example I have had to write seven , very similarly functioning
> protected types to perform the same database functions using the AVL
> trees of the booch components. They protected types save their data
> automatically but why on earth did I need to write seven (and debug !
> and maintain! eek).

Indeed, eek.

> I think protected types remove a lot problems and save writing tasks
> but in this case the task probably should have been used just to
> maintain the genericness ( or genericisity), but this would have been
> at the cost of the solid robustness provided by protected types.

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.

> Are we too late to have our requests considered by whoever makes these
> decisions ?

The Ada Rapporteur Group makes these decisions, ultimately approved by
WG9 and the ISO.  Send your request to ada-comment@ada-auth.org, and see
what they say.  You have to give a concrete proposal, with details
worked out, or they'll probably pay no attention.

- Bob



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-10 14:04 ` Hyman Rosen
@ 2003-04-14 14:34   ` Tony Gair
  2003-04-14 15:33     ` Bill Findlay
  0 siblings, 1 reply; 13+ messages in thread
From: Tony Gair @ 2003-04-14 14:34 UTC (permalink / raw)


Hyman Rosen <hyrosen@mail.com> wrote in message news:<1049983458.473868@master.nyc.kbcfp.com>...
> Tony Gair wrote:
> > I would like to see generic protected types in ada 2005.
> 
> I don't know Ada, but isn't it possible to declare a
> protected type inside a generic package? If so, doesn't
> that do what you need?

HHhhhhmmmm no.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-11  0:10 ` Robert A Duff
@ 2003-04-14 14:39   ` Tony Gair
  2003-04-14 15:34     ` Wesley Groleau
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Tony Gair @ 2003-04-14 14:39 UTC (permalink / raw)


> 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.

I disagree with the statement that tasks are no more generic than
PO's.
For instance try declaring a generic protected object.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-14 14:34   ` Tony Gair
@ 2003-04-14 15:33     ` Bill Findlay
  0 siblings, 0 replies; 13+ messages in thread
From: Bill Findlay @ 2003-04-14 15:33 UTC (permalink / raw)


On 14/4/03 15:34, in article
6a90b886.0304140634.73760f61@posting.google.com, "Tony Gair"
<tony_gair@yahoo.co.uk> wrote:

> Hyman Rosen <hyrosen@mail.com> wrote in message
> news:<1049983458.473868@master.nyc.kbcfp.com>...

>> I don't know Ada, but isn't it possible to declare a
>> protected type inside a generic package? If so, doesn't
>> that do what you need?
> 
> HHhhhhmmmm no.

Why not?

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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     ` 
  2 siblings, 0 replies; 13+ messages in thread
From: Wesley Groleau @ 2003-04-14 15:34 UTC (permalink / raw)


Tony Gair wrote:
> For instance try declaring a generic protected object.

generic

    -- package instantiation here

    -- subprogram here

    type Custom_Type is ......

    -- generic constant here

package Customizable is

    protected Safe_Object is
       -- subprograms whose bodies can reference
       -- ANY of the generic parameters
    private
       The_Data : Custom_Type;
    end;

end Customizable;

....

    package Customized is new Customizable (.......);

    X : Customized.Safe_Object;

.....




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-10 13:22 something I would like to see in ADA 2005 Tony Gair
                   ` (2 preceding siblings ...)
  2003-04-11  0:10 ` Robert A Duff
@ 2003-04-14 15:40 ` Stephen Leake
  3 siblings, 0 replies; 13+ messages in thread
From: Stephen Leake @ 2003-04-14 15:40 UTC (permalink / raw)


tony_gair@yahoo.co.uk (Tony Gair) writes:

> I would like to see generic protected types in ada 2005.
> 
> For example I have had to write seven , very similarly functioning
> protected types to perform the same database functions using the AVL
> trees of the booch components. They protected types save their data
> automatically but why on earth did I need to write seven (and debug !
> and maintain! eek).

Please post the code, and an example of how you would like it to work
instead. 

Then we'll know what you mean by "generic protected types".

> I think protected types remove a lot problems and save writing tasks
> but in this case the task probably should have been used just to
> maintain the genericness ( or genericisity), but this would have
> been at the cost of the solid robustness provided by protected
> types.

That sounds like a good rationale.

> Are we too late to have our requests considered by whoever makes
> these decisions ?

Not too late. But you have to have an actual proposal, not just an
idea. 

The proposal has to read like the Ada RM; give complete syntax,
legality rules, and semantics. Lots of work!

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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     ` 
  2 siblings, 0 replies; 13+ messages in thread
From: Bill Findlay @ 2003-04-14 15:41 UTC (permalink / raw)


On 14/4/03 15:39, in article
6a90b886.0304140639.4ee1abfb@posting.google.com, "Tony Gair"
<tony_gair@yahoo.co.uk> 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.

Nothing prevents you.
(But I suspect you did not mean what you said.)

> 
> I disagree with the statement that tasks are no more generic than
> PO's.
> For instance try declaring a generic protected object.

Why don't *you* try declaring a generic task?
Be sure to let us know how you get on.

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  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       ` 
  2 siblings, 1 reply; 13+ messages in thread
From:  @ 2003-04-15  8:10 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: something I would like to see in ADA 2005
  2003-04-15  8:10     ` 
@ 2003-04-15  8:29       ` 
  0 siblings, 0 replies; 13+ messages in thread
From:  @ 2003-04-15  8:29 UTC (permalink / raw)


   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
> 





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-04-15  8:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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       ` 
2003-04-14 15:40 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox