DIP27 available for destruction

Timon Gehr timon.gehr at gmx.ch
Wed Feb 27 02:38:05 PST 2013


On 02/27/2013 11:24 AM, deadalnix wrote:
> On Wednesday, 27 February 2013 at 09:38:56 UTC, Timon Gehr wrote:
>> I'm not sure why elaboration would be necessary.
>> Remove the optional parens part, then:
>>
>> int foo(int x){ ... }
>>
>> 2.foo // <- no meaning assigned by your DIP, make it a function call
>
> I considered optional parentheses where you would have an error, but I'm
> afraid that this could create weird effect with function overloads.
>

There are no weird effects with function overloads in what I propose. 
What is the issue you are seeing?

> It may be limited to the case where expression can't be used as
> statement because it has no effect.

Then it is not worth it.


More information about the Digitalmars-d mailing list