On Wed, 2007-05-02 at 00:16 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > And what should we move on TO? 
> >   
> 
> Another two. What does the keyword "all" do? 

It prevents users using it as an identifier, since it
is very likely to be used in the future, eg Haskell has

        map: (forall t. t -> t) ->  C t -> C t

to provide second order polymorphism. Perhaps we'll not
use 'all' or 'exists' etc.

> I can't find any reference 
> to it in any of the tests or documentation. Could we get rid of it to 
> free it up for a variable name?

I'd rather make a list of common words and deny the lot of them
to the user: any, or, all, this, that, other, ... :) You shouldn't
use such names.

> Second, could we remove/rename the type "any"? I think it'll be pretty 
> rare for people to need a universal type. Maybe if we add first-class 
> dynamic typing, but I bet there's a better way to do that.

It's probably useless at the moment because unification doesn't
support subtyping. The main use is something like:

        fail: 1 -> any = "exit(99);";

so you can write

        match x with 
        | 1 => 1
        | 2 => 2
        | 3 => fail ()
        ...

[which won't work at the moment].

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to