Killing the comma operator

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Wed May 11 06:13:26 PDT 2016


On Wednesday, 11 May 2016 at 10:50:47 UTC, Lionello Lunesu wrote:
> On 10/5/2016 22:16, deadalnix wrote:
>> On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu 
>> wrote:
>>> On 5/10/16 12:52 PM, Mathias Lang wrote:
>>>> So, following DConf2016, I raised a P.R. to deprecate usage 
>>>> of the comma
>>>> expressions, except within `for` loops increment [5].
>>>
>>> The agreed-upon ideea was to allow uses that don't use the 
>>> result
>>> (including for loops). No? -- Andrei
>>
>> Let's just make it of void type, there was plan to recycle the 
>> syntax
>> maybe, but whatever we do in the future, this is the sensible 
>> first step.
>
> Acutally, we can do two-birds-one-stone: instead of making it 
> void, make it a value tuple!
>

No. You can't change semantic to something that'll still work 
under the feet of the user. If this syntax is to be recycled to 
tuple, the value needs to be void for a while as to shake out 
uses.

It is safe to go from void to something else, it isn't not to go 
from something to something else.



More information about the Digitalmars-d mailing list