<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=""><blockquote type="cite" class="">On Jan 16, 2016, at 1:20 PM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Definitely, Rob Rix has run into this problem in the wild too. I think that's a general ergonomic problem with our pattern syntax, though; 'let' on every pattern variable is verbose, and it's tempting when doing heavy pattern matching to reflexively type 'case let' at the start of every match to avoid it.</span></div></blockquote></div><br class=""><div class="">That could be fixed by getting rid of “case let”, though, and just putting the “let” next to the actual variable name:</div><div class=""><br class=""></div><div class="">case .Foo(let bar):</div><div class=""><br class=""></div><div class="">instead of:</div><div class=""><br class=""></div><div class="">case let .Foo(bar):</div><div class=""><br class=""></div><div class="">It seems a little more consistent with Swift’s type system in general, and it actually works today (at least, it did in the playground I just tried it in). And since it’s entered at the same time as you’re entering a variable name into the parens, it’s less likely to provoke that “argh, I forgot to put the left bracket on my Objective-C method” feeling that could cause one to reflexively type “case let” in the first place.</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div></body></html>