comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Generic primitives
Date: 1999/08/04
Date: 1999-08-04T00:00:00+00:00	[thread overview]
Message-ID: <37a7bac3@news1.us.ibm.net> (raw)
In-Reply-To: slrn7p4agv.2so.aidan@skinner.demon.co.uk

In article <slrn7p4agv.2so.aidan@skinner.demon.co.uk>,
aidan@skinner.demon.co.uk (Aidan Skinner) wrote:


>Right, I'm wondering if it's possible to make a generic program a
>primitive operation of a class. 

I've been away from CLA for awhile, and so I'm not sure if anyone answered
your question.  The answer is, No, generic operations aren't primitive for
the type.

Mats Weber discussed this feature (flaw?) in his PhD thesis.  I don't have
the URL handy.

Can you make the operation class-wide?  What about making a (non-generic)
primitive operation that takes Bar as an argument (pointer to subprogram)?


>  declare
>  type Foo is abstract tagged private;
>
>  generic
>     with procedure Bar (Flibble : in Foo);
>
>  procedure Tribble (Flibble : in Foo) is abstract;
>
>  type Fubar is new Foo with null record;
>
>  procedure Tribble (Flibble : in Fubar) is
>
>  begin
>     Bar (Flibble);
>  end Tribble;
>
>  type Wibble is new Fubar;
>
>  Wibble1 : Wibble;
>
>  Tribble (Wibble1);
>
>  end;




      reply	other threads:[~1999-08-04  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-18  0:00 Generic primitives Aidan Skinner
1999-08-04  0:00 ` Matthew Heaney [this message]
replies disabled

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