On Mon, 2007-05-07 at 22:06 +0100, Ben Smith wrote: > On 07/05/07, Erick Tryzelaar <[EMAIL PROTECTED]> wrote: > > > 8. We have a lot of c wrapping keywords, "cclass", "cfun", "cparse", > > "cproc", "cstruct", and "ctypes". Perhaps we could replace all of these > > with just a prefix keyword like "cwrap" which you could use like "cwrap > > class", "cwrap fun" and etc. I'm not crazy about that particular name > > though. > > ...When you read it quickly, it sounds like "crap". > > > --- Sorry, I know that's not particularly helpful input. From an > outsider's perspective, though, Felix does appear to have a lot of > keywords and funny syntaxes to be remembered...
There's a reason for that: it has it's own abstract syntax and semantics AND an extension for binding to C. Some languagee call this an FFI but for Felix it is really a 'native' interface not a foreign one .. :) It is messy though. For example: type int = "int"; ctypes int; // means the same -- just sugar fun f: int -> int = "f($1)"; fun f(x:int):int => x + x; fun f(x:int): int = { return x + x; } It's a bit ugly that the C binding uses a string, would may have been better to have: fun f: int -> int = C"f($1)"; fun f(x:int):int = x + x; -- 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