Lambdas with implicit type parameters

Brian Goetz brian.goetz at oracle.com
Wed Feb 20 14:29:00 PST 2013


> Beyond that, I think the main question is how we feel about the
> instability it creates in the language design -- the most stable
> point would be either to prohibit generic descriptors altogether, or
> provide syntax for generic lambdas.  But those alternatives are
> unattractive.  Our compromise point was to say method references can
> be generic, but lambdas cannot -- a little more awkward, but still a
> pretty clear line.  Making this change would mean lambdas can be
> generic *as long as you don't need to talk about the type
> parameters*.  That's a lot harder to explain, and increases the
> likelihood that somebody's going to be really annoyed when they need
> to tweak their program and find that the syntax arbitrarily prohibits
> what they want to say.

I agreed that the current tradeoff is a simpler middle ground between 
the less desirable "prohibited" and "just go all the way" than the 
proposed enhancement.  I think the incremental complexity is not 
justified by the incremental expressiveness.  I think we've found a good 
compromise here and should stick to it.



More information about the lambda-spec-observers mailing list