On 30/05/2009, at 11:28 PM, john skaller wrote:
> For example consider:
>
> fun f[u,t] (x: &u, y&t)=> y,x;
>
> Felix handles this function now for each type,
> generating duplicate code for each instance.
A sufficient condition for a function to be RT polymorphic is that
all parameters and terms are of a type containing type variables
only directly under a pointer.
For example:
fun f[u] (x:u) { val y = *x; return 1; }
is not RT polymorphic as written because
the term *x has type u.
RT polymorphism is only useful if the function is
exported. Normal calls would still be inlined and
instantiated for each type actually used.
--
john skaller
[email protected]
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language