Better lambdas!!!!!!!!!!
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 12 07:40:05 PDT 2015
On 2015-09-10 20:23, Jonathan M Davis wrote:
> That's one of the main reasons that I hate the idea of named arguments.
In Ruby named arguments need to be explicitly requested when declaring a
method:
def bar(a)
a == { a: 3 } # A hash (associative array)
end
def foo(a:)
a == 3
end
foo(a: 3)
bar(a: 3)
Not supplying the name of the parameter in the call to "foo" would
result in an error.
I think named arguments like this is way, _way_ more superior that the
ridiculous idea of using an enum instead of a bool.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list