4 ms·
You would just check t.Item2, no need to assign to variables I'm this example. However, the deconstructor syntax is nice, and now tour functions don't all retur
by EpicEng 10y ago
You would just check t.Item2, no need to assign to variables I'm this example. However, the deconstructor syntax is nice, and now tour functions don't all return Tuple with vaguely named members.
- truncate 10y agoRight. Not great example. What I wanted to say was deconstructor is all about creating new bindings with nicer syntax. You could just do that by calling getters / accessing fields, but you have to write more when you doing that.
- EpicEng 10y agoWell, it allows you to return multiple objects without using an opaque Tuple or creating your own class. Sure, the other options work, this is just a nicer syntax. I mean, I can all of what C# does in C if I want to, but I appreciate the syntactical sugar.