March 10, 2018 What principle difference between structure and Tuple? | ||||
---|---|---|---|---|
| ||||
writeln(is(Tuple!(string, int) == struct)); // true What is real user case where I should use Tuple instead of Struct? |
March 13, 2018 Re: What principle difference between structure and Tuple? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On 3/10/18 9:21 AM, Suliman wrote: > writeln(is(Tuple!(string, int) == struct)); // true That's because Tuple is a struct. > > What is real user case where I should use Tuple instead of Struct? When you want Tuple-like behavior? i.e. using indexes to access members. -Steve |
Copyright © 1999-2021 by the D Language Foundation