Primitives in Generics
John Nilsson
john at milsson.nu
Sat Jul 10 04:52:04 PDT 2010
On Sat, Jul 10, 2010 at 1:31 AM, Neal Gafter <neal at gafter.com> wrote:
> I'm referring to the binding of free
> names appearing in a lambda expression, which in the proposal are first
> sought in the scope of the target type (i.e. not lexically).
Are you arguing that this is a bad thing? If so: why?
To me this seems like a feature that could be quite useful. It's a way
to introduce an implicit scope. Maybe it could come in handy for
defining small DSLs in Java?
>> > C#'s generic delegate types such as Func<Arg,Return> can specialize over
>> > primitives and over different numbers of arguments. SAMs cannot.
>>
>> That is a separate problem which is also much broader, and should be
>> solved as such (i.e. reify generics, then you get that for function
>> types for free - any other solution is going to be partial, anyway).
>>
>
> This has nothing to do with reification. BGGA addresses the issue with its
> function types but does not reify.
There has been a lot of talk about reification to solve some problems.
Maybe this is off topic for lambda-dev but I have to ask if my
intuition is way of here:
To me reification is about bringing static information to the dynamic
domain to enable logic based on this information. But if the logic is
supposed to be based on static information, wouldn't it be better to
bring the logic into the static domain? Why add additional overhead at
runtime that could be resolved at compile time?
BR,
John
More information about the lambda-dev
mailing list