On Sat, Jan 29, 2005 at 06:00:47PM +0000, David Hopwood wrote: > J�rgen Hermanrud Fjeld wrote: > >I would just like to note that I'm finishing my master thesis in > >computer science know, writing a high level compiler for an object > >oriented language Creol. One of the things that has dawned upon me > >during this work is that the type system of the O'Caml language is > >really good, not just a good solution, but the most efficient solution I > >have encountered, both with regard to the functional and object oriented > >parts of their type system. 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. Notice that C does not provide marshalling or run-time type checks. I would suggest to read the first chapter [1] of Furuse's PhD, which provides motivation for extensional polymorphism. [1] http://pauillac.inria.fr/~furuse/thesis/chapter01.ps.gz -- Sincerely | Homepage: J�rgen | http://www.hex.no/jhf | Public GPG key: | http://www.hex.no/jhf/key.txt
signature.asc
Description: Digital signature
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
