Re: What principle difference between structure and Tuple?

2018-03-13 Thread Steven Schveighoffer via Digitalmars-d-learn
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

What principle difference between structure and Tuple?

2018-03-10 Thread Suliman via Digitalmars-d-learn
writeln(is(Tuple!(string, int) == struct)); // true What is real user case where I should use Tuple instead of Struct?