<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>That is a good point and I forgot about that. There are frequent cases where what I am dealing with is not hashable and it is generally a lot of work to make it hashable, including adding a heading function which if done wrong, can lead to errors. <br><br>Sent from my iPhone</div><div><br>On Feb 4, 2016, at 8:38 AM, Charles Constant via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>I still vote for keeping "cases"</div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I see it as a replacement for dictionary literal "pattern matching":<br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(209,47,27)"><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(39,42,216)">1</span><span style="color:rgb(0,0,0)"> : </span>"one"<span style="color:rgb(0,0,0)">, </span><span style="color:rgb(39,42,216)">2</span><span style="color:rgb(0,0,0)"> : </span>"two"<span style="color:rgb(0,0,0)">, </span><span style="color:rgb(39,42,216)">3</span><span style="color:rgb(0,0,0)"> : </span>"three"<span style="color:rgb(0,0,0)">][</span><span style="color:rgb(39,42,216)">1</span><span style="color:rgb(0,0,0)">] ?? </span>"undefined"</div></div><div></div></div></blockquote><div><br></div><div>A dictionary needs keys that are Hashable. A dictionary produces an optional. We've discussed this, and more, earlier in the thread.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Even though it would be nice to have but I don’t think that I would use it frequently.</div></div></blockquote><div><br></div><div>Granted, it's a bit ugly, but given the choice, I would pick "cases" over "case case case case ..." every time.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>In addition, to be more consistent with "case", "cases" would introduce pattern matching which doesn’t seem right with this concise syntax.</div></div></blockquote><div><br></div><div>I haven't thought this through. It just bums me out a little to replace the switch with something that still has imho unnecessary verbosity.</div><div><br></div><div><br></div></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>