digitalmars.D.learn - What principle difference between structure and Tuple?
- Suliman (2/2) Mar 10 2018 writeln(is(Tuple!(string, int) == struct)); // true
- Steven Schveighoffer (4/7) Mar 13 2018 When you want Tuple-like behavior? i.e. using indexes to access members.
writeln(is(Tuple!(string, int) == struct)); // true What is real user case where I should use Tuple instead of Struct?
Mar 10 2018
On 3/10/18 9:21 AM, Suliman wrote:writeln(is(Tuple!(string, int) == struct)); // trueThat'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
Mar 13 2018