Wiki

Changes between Initial Version and Version 1 of WishList

Show
Ignore:
Timestamp:
06/23/12 03:59:58 (13 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WishList

    v1 v1  
     1== Introduction == 
     2 
     3This 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, [http://cobra-language.com/trac/cobra/report fill out a ticket]. You can also start by mentioning these things on the discussion forum or IRC. 
     4 
     5== Eliminate argument repetition in lambdas == 
     6 
     7Like many languages with lambda expressions, Cobra requires you to repeat arguments at least twice; once for the parameter declaration and once for using it: 
     8{{{ 
     9#!cobra 
     10.foo(do(a, b)=a + b) 
     11}}} 
     12I propose a "succinct" form for lambdas where the lambda is implied by prefixing the arguments with a tilde (~): 
     13{{{ 
     14#!cobra 
     15.foo(~a + ~b) 
     16}}} 
     17This 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. 
     18 
     19== See Also == 
     20 
     21 * HelpWanted 
     22 * [http://cobra-language.com/trac/cobra/report Tickets] 
     23 * LanguageTopics 
     24 * WikiStart