<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On Jan 8, 2017, at 09:33, Freak Show <<a href="mailto:freakshow42@mac.com">freakshow42@mac.com</a>> wrote:<br><br></div><blockquote type="cite"><div><blockquote type="cite"><span>On Jan 7, 2017, at 22:51, David Sweeris <<a href="mailto:davesweeris@mac.com">davesweeris@mac.com</a>> wrote:</span><br></blockquote><span></span><br><blockquote type="cite"><span>A really convenient way to pass around multiple values without having to bother with a formal struct.</span><br></blockquote><span></span><br><span>That's actually a big part of my concern.</span><br><span></span><br><span>The people on this list are, I'm certain, among the top programmers working.</span><br><span></span><br><span>I'm more worried about what happens when average (which IME means barely competent) developers get going with this. I suspect nobody will ever declare a struct again.</span></div></blockquote><br><div>Doubtful, since tuples can't have any computed properties, functions, or conform to protocols.</div><br><blockquote type="cite"><div><span>Type declarations are valuable - they are an opportunity to express intent. OTOH, a pair of ints is a pair of ints and if all pairs of ints are type compatible then opportunities for catching errors drop if developers start favoring anonymous tuples over former structs.</span><br></div></blockquote><div><br></div><div>I don't think they are... "(Int, Int)" (without labels) will type-check to any pair of Ints, but IIRC "(x:Int, y:Int)" won't type-check to "(a:Int, b:Int)".</div><br><blockquote type="cite"><div><span></span><blockquote type="cite"><span>On Jan 7, 2017, at 23:37, Derrick Ho <<a href="mailto:wh1pch81n@gmail.com">wh1pch81n@gmail.com</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I think pattern matching is the most compelling reason to keep tuples. </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>If they were gone, how would we replace the following?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>switch (a, b) {</span><br></blockquote><blockquote type="cite"><span>case (value1, value2):</span><br></blockquote><blockquote type="cite"><span>case (value3, value4):</span><br></blockquote><blockquote type="cite"><span>}</span><br></blockquote><span></span><br><span></span><br><span>I really have to ask. What do you use this for? In general iPhone application programming I have never wanted or needed to do that. I do some AudioUnits as well. Still never needed it.</span><br></div></blockquote><div><br></div><div>"Need" is a strong word... Yeah, I <i>could</i> switch over the first value and then for <i>every single case</i> nest another switch over the second value, but that'd be annoying <i>and</i> obscure the underlying logic.</div><br><div>- Dave Sweeris</div></body></html>