<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="">Big +1 on that, I really like the confidence that people won’t easily stick side-effect code in the middle of the big inviting case: sections of the switch statement. That is a safety feature. This really supports a functional programming mindset which Swift is already popular for. <div class=""><br class=""></div><div class="">To this I add: </div><div class="">• Knowing that every case will return a result of the same type and returns a value. <div class="">• automatic type inference </div><div class="">• more concise code, and reduction of repeated code to assign the results. </div><div class="">• less likely people will use var when let is correct, currently the compiler will warn but this avoids any confusion from the start.</div><div class="">• fall through, break and continue are not a concern because you can only put expressions there. <br class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 7, 2016, at 12:07 AM, Charles Constant <<a href="mailto:charles@charlesism.com" class="">charles@charlesism.com</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra">> <span style="font-size:13px" class=""> </span><span style="font-size:13px" class="">would this feature pay for itself?</span></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">If I were coding in a big team, I'd think the fact alone that neither I nor anyone else in the company, can come along and polute my assignment with unrelated code is a plus.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">As it stands, every "switch" statement requires the person reading to review the whole thing. With the current proposal, it's not going to compile unless the statement only contains an assignment. </div><div class="gmail_extra"><br class=""></div></div>
</div></blockquote></div><br class=""></div></div></div></body></html>