From: "Ehud Lamm" <mslamm@mscc.huji.ac.il>
Subject: Re: Generics???
Date: Mon, 2 Jul 2001 21:54:21 +0300
Date: 2001-07-02T21:54:21+03:00 [thread overview]
Message-ID: <9hqgfg$v5h$1@news.huji.ac.il> (raw)
In-Reply-To: 3B40B485.F9E4074B@worldnet.att.net
James Rogers <jimmaureenrogers@worldnet.att.net> wrote in message
news:3B40B485.F9E4074B@worldnet.att.net...
> Short answer: You can't. It would be a violation of Ada's strong
> typing.
>
True enough.
However, you can decalre the type "private" and import operations:
generic
type T is private;
with function "+"(A,B:T) return T is <>;
and than pass the correct routines when instantiating. With the "is <>"
syntax you don't even have to explicitly pass the routines.
Another solution would be to use a generic signature package.
--
Ehud Lamm mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm <== Me!
next prev parent reply other threads:[~2001-07-02 18:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-02 22:33 Generics??? Michael Andersson
2001-07-02 17:48 ` Generics??? James Rogers
2001-07-02 18:54 ` Ehud Lamm [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-07-02 18:42 Generics??? Beard, Frank
2001-07-03 10:32 ` Generics??? Anders Wirzenius
2001-07-03 17:31 ` Generics??? Stephen Leake
2001-07-03 19:09 ` Generics??? tmoran
2001-07-04 5:30 ` Generics??? Anders Wirzenius
1992-09-14 15:00 Generics? cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!net
1992-09-09 5:26 Generics? Andrew Dunstan
1992-09-09 1:34 Generics? Rob Allen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox