Version 1 (modified by Charles, 8 years ago)



This is the wish list. Don't be shy. Jot down your wishes here, or if it's something that really needs to fixed or done, fill out a ticket. You can also start by mentioning these things on the discussion forum or IRC.

Eliminate argument repetition in lambdas

Like many languages with lambda expressions, Cobra requires you to repeat arguments at least twice; once for the parameter declaration and once for using it:

.foo(do(a, b)=a + b)

I propose a "succinct" form for lambdas where the lambda is implied by prefixing the arguments with a tilde (~):

.foo(~a + ~b)

This will look extra sweet when stacking up multiple LINQ calls or any other API that makes heavy use of lambda expressions. Note that one disadvantage is that if the expression needs to use the arguments in a different order then you will have to use the full "do" form.

See Also