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 <[EMAIL PROTECTED]>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev