Regarding Issue 9423
Paulo Pinto
pjmlp at progtools.org
Wed Jan 30 03:51:22 PST 2013
On Wednesday, 30 January 2013 at 11:17:30 UTC, Namespace wrote:
> On Wednesday, 30 January 2013 at 11:10:17 UTC, bearophile wrote:
>> Currently you are allowed to write a lambda literal as in line
>> 3, but you can't omit "ref" as in line 4:
>>
>>
>> void foo(int delegate(ref int[1]) spam) {}
>> void main() {
>> foo((ref x) => 0); // line3, OK
>> foo(x => 0); // line4, Error
>> }
>>
>>
>> Do you think "ref" annotation should be required at the call
>> site?
>>
>> This is the Bugzilla thread. Hara has already implemented the
>> "ref" inference, but he's not sure if it's a good idea:
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=9423
>>
>> Bye,
>> bearophile
>
> I like it.
> Would be a good time to require this for normal functions and
> methods also. As C# it does.
I prefer the Pascal family way where they are implicit, but lets
have what the majority prefers.
More information about the Digitalmars-d
mailing list