<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>See</div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019825.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019825.html</a></div><div><br></div><div>as well as&nbsp;</div><div><br></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019908.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019908.html</a></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019827.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019827.html</a></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019826.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019826.html</a><br><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019905.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019905.html</a></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019878.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019878.html</a></div><div><br></div><div><br><div><div>Regards</div>(From<span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.294118);">&nbsp;mobile)</span></div></div><div><br>On Jun 2, 2016, at 8:56 PM, Ricardo Parada &lt;<a href="mailto:rparada@mac.com">rparada@mac.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Hi Laurent,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Do you have the details of your proposal, I missed it.&nbsp;<br><br></div><div id="AppleMailSignature">Thanks</div><div><br>On Jun 2, 2016, at 1:48 AM, L Mihalkovic &lt;<a href="mailto:laurent.mihalkovic@gmail.com">laurent.mihalkovic@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 2, 2016, at 5:05 AM, Christopher Kornher 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 7:48 PM, Ricardo Parada 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=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">On May 31, 2016, at 3:04 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=""></div><blockquote type="cite" class=""><div class=""><font face="Menlo" class="">let _ = scaleAndCropImage(image: myImage, toSize: size, operation: .fill)</font></div><div class=""><br class=""></div><div class="">You would not be able to assign `.fill` to a variable and use that for the operation value.</div></blockquote><br class=""><div class="">This is my objection to this idea. It does not encourage reuse.</div></div></div></blockquote><div class=""><br class=""></div><div class="">-1For me too. Introducing this quasi-enum would increase cognitive load with little, if any, net benefit. This is the sort of feature that looks great and works wonderfully in example apps, but does not scale well to real systems, where options show up in more methods through time, get passed around to helpers, stored, marshaled into various formats, etc.</div><div class=""><br class=""></div><div class="">As someone mentioned, this would probably be a good fit If Swift adopts a structural type system (I suppose, I have ever used a language with one to my knowledge, unless duck typing counts)</div><div class=""><br class=""></div><div class="">As syntactic sugar for a true enum declaration, it would be a “cool” feature, but reuse would still be problematic.&nbsp;</div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>there is no reuse problem in the interpretation I propose, and the long/short form names are completely interchangeable.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">I would not be able to assign to a variable:</div><div class=""><br class=""></div><div class="">let <b class="">selectedOperation</b> = .fill</div><div class=""><br class=""></div><div class="">In order to then do this later in the program:</div><div class=""><br class=""></div><div class="">scaleAndCropImage(image: myImage, toSize: size, operation: <b class="">selectedOperation</b>)</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div></blockquote></body></html>