C++17 is feature complete

Patrick Schluter via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 27 07:57:10 PDT 2016


On Monday, 27 June 2016 at 06:52:58 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 27 June 2016 at 03:09:46 UTC, Meta wrote:
>> On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote:
>>> On 6/26/2016 10:18 AM, Enamex wrote:
>>>>   - template arguments that accept constant values of any 
>>>> type whatsoever
>>>> 'template<auto Arg>';
>>>
>>> Still adding D features, I see!
>>
>> Imitation is the sincerest form of flattery, so when is 
>> destructuring coming to D?
>>
>> Also, the `if (init; condition) and switch (init; condition)` 
>> seems like a very nice idea.
>
> It's from Go,  I don't see much value in it. You can just wrap 
> the if in a block:
>
> {
>   init;
>   if(condition)…
> }
>
> That is usually more readable IMO.
I forgot. No it's not more readable, to the contrary. The issue 
is that normally { } introduces an indentation, which is always 
associated with some kind of branching. Adding an indentation 
just for the declaration of a variable is an inconsistency 
annoying to read. I had the case several times in the code I was 
transforming and it had me each time puzzled at where the loop or 
condition was.




More information about the Digitalmars-d mailing list