comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria.organon.com (Jon S Anthony)
Subject: Re: Generics question
Date: 1997/07/24
Date: 1997-07-24T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Jul24155426@alexandria.organon.com> (raw)
In-Reply-To: 5r7cvb$bfb@top.mitre.org


In article <5r7cvb$bfb@top.mitre.org> mfb@mbunix.mitre.org (Michael F Brenner) writes:

>     > To do a general numerical algorithm like you describe the Ada 95 idiom is:
>     >   generic
>     >   type Numeric_Type is private;
>     >   with function "+" (X,Y : Numeric_Type) return Numeric_Type is <>;
>     >   with function "-" (X,Y : Numeric_Type) return Numeric_Type is <>;
>     >   with function "*" (X,Y : Numeric_Type) return Numeric_Type is <>;
>     >   ... etc ...
>     >   package Numerics is
> 
> The etc is not too bad in an unnested generic package, but there is no limit
> to how big it can get in nested packages, which is why Ada-200X should
> consider passing packages to packages.

?!?!??  Ada95 supports passing packages to packages (generically) and
one of its intended uses is for just this kind of thing (signatures
with boatloads of operations).

/Jon

-- 
Jon Anthony
OMI, Belmont, MA 02178
617.484.3383
"Nightmares - Ha!  The way my life's been going lately,
 Who'd notice?"  -- Londo Mollari




  reply	other threads:[~1997-07-24  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-22  0:00 Generics question Skip Carter
1997-07-22  0:00 ` W. Wesley Groleau x4923
1997-07-23  0:00 ` Brian Rogoff
1997-07-24  0:00   ` Michael F Brenner
1997-07-24  0:00     ` Jon S Anthony [this message]
1997-07-24  0:00     ` Brian Rogoff
1997-07-23  0:00 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1989-09-19 23:03 Generics Question Jay Labhart
replies disabled

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