On Fri, 2007-05-11 at 13:08 +0200, Nicolas Pouillard wrote:

> IMHO Ruby is a lot more consistent than Python which badly mix OO and
> imperative styles.

OO *is* an imperative style. The problem with Python is it
has functional stuff too, but it isn't referentially transparent
because it makes the mistake of thinking everything is an object
(i.e. pass by reference instead of value).

> I think that one shouldn't sacrifice shortness of code.

I agree, but there is a big difference between shortness
of code, and shortness of ideas.

TO be comprehensible, a language needs a small set of
powerful ideas. For example lambda calculus only has
two constructions: application and abstraction.

        f x        // application
        fun x -> y // abstraction

and only one rule:

        (fun x -> y) z ==> y with each free x replaced by z

However, real code gets quite complex if you only use
primitives so languages have sugar which shortens it.

Felix has a LOT of sugar. For example:

        { x }  ==> fun () => x
        { x; } ==> proc () { x; }

        if c then b else c endif ==>
        match c with
        | case 1 of 2 => b
        | case 0 of 2 => c
        endmatch

Yes, if/then/else/endif is literally implemented by a match.
And matches desugar to something lower level too.

>  However one
> can have better support in the language to dealing with large
> programs.

Felix also needs constructions for binding to C/C++,
and this adds considerable complexity.

To be honest a lot of stuff was thrown in 'ad hoc'
to see what we would get. Many nasty inconsistencies
result. The worst is

        fun f .. = or => ?

and close behind 

        fun f: int -> int; // C wrapper not a declaration!
        virtual fun f: int -> int; // declaration, but not virtual :)
        type int = "int"; // since when is a string a type? 
..
and a few more sillinesses.

-- 
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