[bitc-dev] Bitc -> Polymorphic
David Hopwood
david.nospam.hopwood at blueyonder.co.uk
Sat Jan 29 15:17:26 EST 2005
Jørgen Hermanrud Fjeld wrote:
> On Sat, Jan 29, 2005 at 06:00:47PM +0000, David Hopwood wrote:
>>Jørgen Hermanrud Fjeld wrote:
>>
>>>[...] Had I understood then what I know now, and
>>>wanted to create a language, I would just start with the O'Caml type
>>>system, as it is theoretically sound and everything can be statically
>>>type checked.
>>
>>But see <http://c2.com/cgi/wiki?OcamlSafetyDiscussion>.
>
> Yes, and the work by Furuse on extensional polymorphism does address
> this issue, as well as overloading, with a theoretical foundation,
> which is why I think an O'caml like type system with extensional
> polymorphism should be considered.
> It is not possible to do marshalling without a run-time checking of
> types, and with the pattern matching on types features of extensional
> polymoprhism, this becomes possible and natural.
> Another question is if library functions should raise exceptions or return
> optional types, and with generics the library can provide both behaviours.
>
> But the problems raised on the mentioned page does not have relevance to
> the merits of O'Caml as a static type system, but to the interaction
> between a static type system and components that require run-time
> checks.
That is in fact the argument being made by the person writing in italics on
that page (me).
<http://c2.com/cgi/wiki?OcamlTypeSafetyProblem> is a refactored version of
the page that may make this clearer. I've also added your reference to
Furuse's PhD.
--
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>
More information about the bitc-dev
mailing list