<div dir="ltr">I don’t think I would use this often, but when I did use it, it would be great. +1 from me.<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div style="font-family:Helvetica"><br></div><div style="font-family:Helvetica">Jeff Kelley</div><div style="font-family:Helvetica"><br></div><div style="font-family:Helvetica"><a href="mailto:SlaunchaMan@gmail.com" style="color:rgb(17,85,204)" target="_blank">SlaunchaMan@gmail.com</a> | <a href="https://twitter.com/SlaunchaMan" style="color:rgb(17,85,204)" target="_blank">@SlaunchaMan</a> | <a href="http://jeffkelley.org/" style="color:rgb(17,85,204)" target="_blank">jeffkelley.org</a></div></div></div></div>
<br><div class="gmail_quote">On Fri, Feb 19, 2016 at 11:46 AM, Yong hee Lee via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi, I have a proposal.<div><br></div><div><br></div><div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:#0433ff">enum</span> Foo {</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">  <span style="color:#0433ff">case</span> foo,bar</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">}</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo;min-height:19px"><br></div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:#0433ff">func</span> test(a:<span style="color:#3495af">Foo</span>) {</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">  // …</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">}</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo;min-height:19px"><br></div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(52,149,175)">test<span style="color:#000000">(.</span>bar<span style="color:#000000">)</span></div></div><div><span style="color:#000000"><br></span></div><div><br></div><div>If I use an enum only as a parameter of a function, the name of enum  is redundant. </div><div><br></div><div>so I suggest a compact version like below.</div><div><br></div><div><br></div><div><br></div><div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:#0433ff">func</span> test(a:[<span style="color:#3495af">foo</span>|bar]) {</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:rgb(0,0,0)">  </span><font color="#3495af">// ...</font></div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">}</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo;min-height:19px"><br></div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:#3495af">test</span>(.bar)</div></div><div><br></div><div><br></div><div><br></div><div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo"><span style="color:rgb(4,51,255)">func</span> adjustTemperature(temp:[low|<font color="#3495af">normal</font>|high]) {</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">  <font color="#3495af">// ...</font></div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo">}</div><div style="margin:0px;font-size:16px;line-height:normal;font-family:Menlo;min-height:19px"><br></div></div><div><span style="font-family:Menlo;font-size:16px">adjustTemperature</span><span style="font-family:Menlo;font-size:16px">(.high)</span></div><div><span style="font-family:Menlo;font-size:16px"><br></span></div><div><span style="font-family:Menlo;font-size:16px"><br></span></div><div><span style="font-family:Menlo;font-size:16px"><br></span></div><div><span style="font-family:Menlo;font-size:16px">I think this is very useful.</span></div><div><font face="Menlo" size="3">What do you think?</font></div><div><font face="Menlo" size="3"><br></font></div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>