<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 20, 2016, at 1:26 PM, Tyler Fleming Cloutier via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">Also as a brief aside, it’s not super intuitive to me that the syntax for the catch pattern matching wildcard is </div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">catch</span><span style="font-family: Menlo; font-size: 11px;" class=""> <font color="#bb2ca2" class="">_</font></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px;" class=""><font color="#bb2ca2" class=""><br class=""></font></span></div><div style="margin: 0px; line-height: normal;" class="">whereas it is</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">default</span></div><div style="margin: 0px; line-height: normal;" class=""> </div><div style="margin: 0px; line-height: normal;" class="">for switches. I think I saw Chris mention somewhere that default was chosen because of it’s wide familiarity. Does anyone recall the reason?</div></div></div></div></blockquote></div><br class=""><div class="">Yes, both `switch` and `default` were chosen because that's what other C-style languages use.</div><div class=""><br class=""></div><div class="">Note that `case _` is the same as `default` in `switch`, so you can use `case _` and `catch _` if you don't care about C-style appearance. </div><div class=""><br class=""></div><div class="">I don't think anyone has proposed allowing `default` in place of `catch _`. There was an earlier discussion of removing `default` from `switch` and requiring `case _` instead (thread "Remove default case in switch-case" on swift-evolution).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">-- </div><div class="">Greg Parker <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a> Runtime Wrangler</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>