<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Laurent,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Do you have the details of your proposal, I missed it. <br><br></div><div id="AppleMailSignature">Thanks</div><div><br>On Jun 2, 2016, at 1:48 AM, L Mihalkovic <<a href="mailto:laurent.mihalkovic@gmail.com">laurent.mihalkovic@gmail.com</a>> 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 <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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 <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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 <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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. </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></body></html>