Make dur a property?

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Jan 23 11:03:32 PST 2013


23-Jan-2013 22:57, Nick Sabalausky пишет:
> On Wed, 23 Jan 2013 19:40:02 +0100
> "Adam D. Ruppe" <destructionator at gmail.com> wrote:
>
>> On Wednesday, 23 January 2013 at 18:24:22 UTC, Johannes Pfau
>> wrote:
>>> This sounds OK, but you can still run into the callable issue
>>> if a normal function returns a callable.
>>
>> I don't think so because delegates require the parens to call
>> anyway, and so do opCall objects (without the parens, it is just
>> a reference to it).
>>
>
> So you want it to work like this?:
>
>      void foo() {...}
>      void delegate() {...} bar;
>
>      foo; // call it

This is a call, arguably bad style

>      bar; // don't call it

compile-time error, as statement has no side-effects?
(and we have this kind of check even now)



-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list