(git HEAD) std.datetime spewing deprecation messages

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 4 10:57:15 PDT 2014


On Wednesday, 4 June 2014 at 17:06:22 UTC, Meta wrote:
> On Wednesday, 4 June 2014 at 15:51:58 UTC, John Colvin wrote:
>> Assuming hours, minutes and seconds are already declared, you 
>> can do this already
>>
>> TypeTuple!(hours, minutes, seconds) = dur.parts;
>>
>> A full working example of the syntax:
>>
>>
>> import std.typetuple;
>> import std.typecons;
>> import std.stdio;
>>
>> void main()
>> {
>> 	int a,b;
>> 	TypeTuple!(a, b) = tuple(5, 8);
>> 	assert(a == 5 && b == 8);
>> }
>
> *Assuming they're already declared* is the thing to note. 
> There's little point in a tuple destructuring syntax if you 
> have to declare the variables beforehand anyway.

I would say it's still quite useful, but I agree it's not ideal.


More information about the Digitalmars-d mailing list