Last - but not least! - two DConf talks
via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Fri Jul 17 01:16:19 PDT 2015
On Thursday, 16 July 2015 at 08:59:43 UTC, Jacob Carlborg wrote:
> On 2015-07-16 10:26, "Marc =?UTF-8?B?U2Now7x0eiI=?=
> <schuetzm at gmx.net>" wrote:
>
>> Do mixin templates work on module level? They can even have an
>> identifier.
>
> Yes. But a mixin template seems only be able to contain
> declarations. How did you plan to use it?
As Atila posted.
>
>> Unfortunately there are syntactical ambiguities:
>>
>> step("foo bar") {
>> }
>> .foo();
>>
>> Is that a call chain, or two statements, with the second one
>> calling a
>> function in the root scope? And I think there are other
>> similar cases...
>
> Hmm, right. I have simple implementation of this. With you're
> example I get this error message:
>
> function main.foo () is not callable using argument types (void
> function() @safe)
I guess we could even live with that. If someone wants the latter
interpretation (which is kind of infrequent), they could insert a
semicolon.
Does your implementation support parameterized lambdas? I can
already see the next ambiguity:
someRange.each (element) {
writeln(element);
}
Do the parentheses belong to the lambda on the right or the
function on the left?
More information about the Digitalmars-d-announce
mailing list