From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Discriminated records are not the most efficient, but ...
Date: Mon, 23 Aug 2010 07:43:26 +0200
Date: 2010-08-23T07:43:26+02:00 [thread overview]
Message-ID: <87d3t9riip.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: op.vhvktu1kule2fv@garhos
* Yannick Duchêne (Hibou57):
> In ML : a functor has the following signature: “structure ->
> structure”. So at first sight, this may seems ML functors cannot model
> Ada packages. But as a functor takes a structure to return a
> structure, this is exactly the same as with an Ada generic
> instantiation. As in ML a functor cannot create a structure signature
> and can only create a structure matching a structure signature,
> finally, application of an ML functor exactly match the process of
> instantiating an Ada generic.
Except that ML favors structural typing, and Ada is focused strongly
on nominal typing.
> Conclusion: the Ada package system can be properly modeled with ML.
Standard ML doesn't support functors nested in structures and
higher-order functors, but both are a common extension.
> Definition of an ML signature = Ada specification of a package or
> generic package (formal part excluded)
No, these two aren't equivalent. You cannot apply a specification to
a package to get a new package (with a restricted interface, as some
sort of type conversion). In Standard ML, you can.
next prev parent reply other threads:[~2010-08-23 5:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 21:18 Discriminated records are not the most efficient, but Yannick Duchêne (Hibou57)
2010-08-21 21:57 ` Yannick Duchêne (Hibou57)
2010-08-22 5:39 ` Yannick Duchêne (Hibou57)
2010-08-22 20:40 ` Yannick Duchêne (Hibou57)
2010-08-22 20:47 ` Florian Weimer
2010-08-22 22:07 ` Yannick Duchêne (Hibou57)
2010-08-22 22:11 ` Yannick Duchêne (Hibou57)
2010-08-23 3:06 ` Peter C. Chapin
2010-08-23 3:50 ` Yannick Duchêne (Hibou57)
2010-08-23 6:25 ` J-P. Rosen
2010-08-23 8:09 ` Yannick Duchêne (Hibou57)
2010-08-23 6:40 ` Niklas Holsti
2010-08-23 7:33 ` Simon Wright
2010-08-23 11:44 ` Martin
2010-08-23 13:16 ` Georg Bauhaus
2010-08-23 13:32 ` Martin
2010-08-23 17:02 ` Yannick Duchêne (Hibou57)
2010-08-23 8:13 ` Yannick Duchêne (Hibou57)
2010-08-23 1:52 ` Yannick Duchêne (Hibou57)
2010-08-23 5:14 ` Yannick Duchêne (Hibou57)
2010-08-23 5:43 ` Florian Weimer [this message]
2010-08-23 7:55 ` Yannick Duchêne (Hibou57)
2010-08-23 8:06 ` Dmitry A. Kazakov
2010-08-23 8:26 ` Yannick Duchêne (Hibou57)
2010-08-23 8:43 ` Dmitry A. Kazakov
2010-09-04 18:49 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox