Why Ruby?

Nick Sabalausky a at a.a
Sat Dec 18 18:18:56 PST 2010


"Walter Bright" <newshound2 at digitalmars.com> wrote in message 
news:iejl6i$16f5$1 at digitalmars.com...
> Nick Sabalausky wrote:
>> Yes, because in practice "a>b" must end up being evaluated in the wrong 
>> scope. I've used std.algorithm very little so far, and yet I've still 
>> found that limitation to be a problem.
>
> But it works fine for trivial lambdas, and if you're going beyond that, 
> there's the fuller, complete syntax.

int foo(int x) { ... }
map!"foo(a) * 2" // Trivial lambda, but it fails

void bar(int delegate(int) dg) { ... }
bar("a+7") // Also fails

I don't think it's at all unreasonable to expect both of those to work with 
a short lambda syntax. That neither of them do I think is a clear sign that 
it's more of a clever hack than a real solution.




More information about the Digitalmars-d mailing list