Are function types a requirement?

Mark Thornton mthornton at optrak.co.uk
Thu Feb 18 00:47:52 PST 2010


Reinier Zwitserloot wrote:
> How to allow primitives in generics declarations has been researched, and
> abandoned, before, but if we can solve this problem today then function
> types can be dropped. The cost/value analysis of trying to make it work has
> perhaps changed now - simplying closures considerably is now added to the
> value.
>
> ...
>
> If anyone remembers or has a link to the problems inherent in allowing
> primitives in generics, that would be useful for this discussion.
>   
I found it difficult to do consistently without also reifying generics. 
You have to reify the primitives so that f(int) is distinct from 
f(double). Then you really want to reify the rest as well. At least that 
is my amateur take on it.

Mark Thornton




More information about the lambda-dev mailing list