<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="">My worry is that this isn’t very different from<div class=""><br class=""></div><div class=""><span style="font-family: Menlo;" class="">enum Temperature { case low, normal, high }</span></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">It’s 7 more characters and fully expressible now.</div><br class=""><div class="">- Harlan</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 19, 2016, at 12:48 PM, Sean Heber via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I too very much like the cleverness of this, but in my experience often what is initially a single-use enum turns into a multi-use enum in short order, so I don’t know if I’d be able to use this much at the end of the day.<br class=""><br class="">Gotta say I like that syntax, though. Could be neat as a shorthand for defining regular enum cases, maybe! :P<br class=""><br class="">enum Temperature = [low | normal | high]<br class=""><br class="">l8r<br class="">Sean<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Feb 19, 2016, at 2:42 PM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">It's certainly clever and I particularly like the temperature example.<br class=""><br class="">-- E<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Feb 19, 2016, at 9:46 AM, Yong hee Lee via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">Hi, I have a proposal.<br class=""><br class=""><br class="">enum Foo {<br class=""> &nbsp;case foo,bar<br class="">}<br class=""><br class="">func test(a:Foo) {<br class=""> &nbsp;// …<br class="">}<br class=""><br class="">test(.bar)<br class=""><br class=""><br class="">If I use an enum only as a parameter of a function, the name of enum &nbsp;is redundant. <br class=""><br class="">so I suggest a compact version like below.<br class=""><br class=""><br class=""><br class="">func test(a:[foo|bar]) {<br class=""> &nbsp;// ...<br class="">}<br class=""><br class="">test(.bar)<br class=""><br class=""><br class=""><br class="">func adjustTemperature(temp:[low|normal|high]) {<br class=""> &nbsp;// ...<br class="">}<br class=""><br class="">adjustTemperature(.high)<br class=""><br class=""><br class=""><br class="">I think this is very useful.<br class="">What do you think?<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></blockquote><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></blockquote><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></body></html>