3 ms·
There's definitely always more context than "this returns 2 elements". What are they? What are you storing them in? What did they belong to?
by vips7L 4y ago
There's definitely always more context than "this returns 2 elements". What are they? What are you storing them in? What did they belong to?
- masklinn 4y ago> There's definitely always more context than "this returns 2 elements". Not usefully so. If you’re splitting a collection in two, whatever context you add is almost certainly worthless overhead not worth the extra type.
- titzer 4y agoI'm trying to let programmers make the call here, which is why Virgil gives you both options. In causal hacking, anonymous tuples can be very useful. I find that very true in test code, where I have a tendency to throw more bells and whistles at it to get meat of the tests really short (so I can write a lot of them). Requiring elaborate ceremonies (such defining a bunch of tuple types for no good reason) is just a waste of time.