4 ms·
Nice, I like it. I do wonder what was limiting them before
by tester756 5y ago
Nice, I like it.
I do wonder what was limiting them before
- ygra 5y agoEvery feature starts out with -100 points. So there's always a trade-off to do everything you can imagine to make every last corner case nice or shipping something in a reasonable timeframe. When lambda expressions were introduced they were designed to work well together with LINQ and that whole part of the language isn't a small one either. Storing a lambda expression in a local variable is not such a common occurrence to really need type inference or the ability to add types to lambda expressions. Heck, I'd say, by now with local functions most lambdas that previously would have been a local could now just be a local function.
- kevingadd 5y agoYeah, while I run into the sharp edges that this feature addresses on a regular basis, it typically only costs me a small amount of typing to fix, and it's not that frequent. So it's nice to have but totally reasonable that they never got around to it before.
- jayd16 5y agoThey added an explicit return type, which allows for the full delegate type to be inferred.