comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: Generics question
Date: 1997/07/24
Date: 1997-07-24T00:00:00+00:00	[thread overview]
Message-ID: <5r7cvb$bfb@top.mitre.org> (raw)
In-Reply-To: Pine.SGI.3.95.970723191547.6238A-100000@shellx.best.com


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




  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 [this message]
1997-07-24  0:00     ` Brian Rogoff
1997-07-24  0:00     ` Jon S Anthony
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