4 ms·
Seems like an interesting cross between Python and C#. Any multi-line lambdas? edit: Read into it a bit more. I may wrong, but it doesn't seem to have nested f
by henryl 17y ago
Seems like an interesting cross between Python and C#. Any multi-line lambdas?
edit:
Read into it a bit more. I may wrong, but it doesn't seem to have nested functions and their lambdas are just basically anonymous delegates, not real .NET lambda expressions. Wasn't clear how or if they tackled the multiline lambda problem that occurs in CPython. As it stands, it's pretty similar to C#/VB.NET--only slightly more readable at the expense of being way less mature. Definitely keeping an eye on this one though.
- bad_user 17y agoNo, the anonymous functions do capture the current context. See here: http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tests/320-misc-two/820-anonymous-methods-aka-closures/100-anonymous-methods.cobra?rev=1998 http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tes... Search for the test that increments the "count" variable. I don't really like the syntax for these anonymous methods. Boo is more readable in this regard: http://boo.codehaus.org/Closures http://boo.codehaus.org/Closures