On Wed, 2006-11-08 at 20:13 +1100, skaller wrote:
[]

BTW: separately from this, you might want to create a 
C function -- as you know Felix can and does do that anyhow,
sometimes. But there is no way to force it. You might want
to define:

cfun f(x:int):int =>
  x + x + 42
;

which means that Felix would create a C function of C type

        int ()(int)

which is Felix type

        int --> int

for sure .. not just if the inliner feels like it.

This feature doesn't exist but could be useful.

The function obviously can't use the thread frame
or any parent stack frames, and you can't currently
use it as a closure -- though you can easily wrap a
call to it inside an ordinary Felix function:

        fun cls_f(x:int):int => f x;

and now cls_f has type

        int -> int

and can be passed as a closure.


Of course we could allow passing thread frame
and parent scopes too, but then the type of 
the C function would be hard to determine.


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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to