Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] [ANN] The Missing Library
> > Felix is statically typed, everything is recursive,
> > recursive types are supported, it has generics,
> > overloading by selecting the most specialised
> > function (like C++).
>
> I left static typing of my language for possible future research,
> because designing a good static type system is extremely hard.
>
> Type systems from the functional side typically don't support open world
> assumption wrt. the set of subtypes of a type. They can't express the OO
> way of adding subtypes in various parts of the program, without a
> centralized place where all such extensions are gathered and tied
> together into one type, and with the ability to dynamically check
> whether the given object has the given subtype of the declared type.
> In other words, you can't emulate dynamic typing in them.

You're true, decentralized OO subtyping is more flexible because types are
"opened" for further additions, while ocaml types are "closed" and fully
defined and centralized (that's not the case for polymorphic variants of
course).
I have been working recently on a OO static type system with global type
inference and structural subtyping. The typer works pretty well, although
not yet optimized. I found some interesting properties : redefining an
inherited method is possible, but actually safely breaks implicit subtyping
acquired from inheritence..

Regards,
Nicolas Cannasse

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners