<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks Erica. I agree that there are two distinct, but related problems being discussed here as well as several ideas for solutions. &nbsp;</div><div class=""><br class=""></div><div class="">I will try to provide a side-by-side summary of the problems and proposed solutions in the next day or so when I have a chance to pull it together.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 6, 2015, at 11:26 AM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Matthew, I'll look for it and see what's there. More and more I'm thinking there are in fact two distinct problems to be solved: one that maintains self in a cascade of operations, and another that extends initializers, even for constants.</div><div class=""><br class=""></div><div class="">I'm hesitant to coalesce and summarize all this discussion yet because I'm already committed to championing the for-loop proposal but it seems that it would be really valuable right now to lay out the two side-by-side and discuss that plus your helpers-for-initializing-peroperties-of-same-name-as-parameters.</div><div class=""><br class=""></div><div class="">-- E</div><div class="">p.s. In my head, I'm thinking that the compiler must check in setup closures or self-specific-closures for potential overlaps between properties and existing symbols</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Dec 6, 2015, at 10:22 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</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="">Hi Erica,</div><div class=""><br class=""></div><div class="">You might be interested in a possible language feature I described in the "helpers for initializing properties of same name as parameters" thread last night. &nbsp;It is intended to address the desire for concise, safe and flexible initialization without needing to sacrifice immutability. &nbsp; I would love to hear your thoughts on the list if you have a chance to read through it.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Matthew<br class=""><br class="">Sent from my iPad</div><div class=""><br class="">On Dec 6, 2015, at 11:10 AM, 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=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div class="">I have developed something similar as well (<a href="http://ericasadun.com/2015/11/15/speeding-up-swift-playgrounds-with-closure-initialization-swiftlang/" class="">http://ericasadun.com/2015/11/15/speeding-up-swift-playgrounds-with-closure-initialization-swiftlang/</a>).</div><div class=""><br class=""></div><div class="">Is yours capable of handling enums and structs that would otherwise be let after declaration because mine is not.</div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 5, 2015, at 5:16 PM, ilya 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 dir="ltr" class="">&gt; PROBLEM: With many Apple-supplied classes, typical initializers fail to fully set up an instance for use.&nbsp; Here's one example: ...<div class=""><br class=""></div><div class="">FWIW, I created a configuration operator more then a year ago, and use it in all of my Swift projects:</div><div class=""><br class=""></div><div class=""><div class="">let task = NSTask() +=+ {</div><div class="">&nbsp; &nbsp; $0.launchPath = "/usr/bin/mdfind"</div><div class="">&nbsp; &nbsp; $0.arguments = ["kMDItemDisplayName == *.playground"]</div><div class="">&nbsp; &nbsp; $0.standardOutput = pipe</div><div class="">}</div><div class=""><br class=""></div><div class="">Note you can also use the configured object in the rhs:</div><div class=""><br class=""></div><div class=""><div class="">let questionLabel = UILabel() +=+ {</div><div class="">&nbsp; &nbsp; $0.textAlignment = .Center</div><div class="">&nbsp; &nbsp; $0.font = &nbsp;UIFont(name:"DnealianManuscript", size: 72)</div><div class="">&nbsp; &nbsp; $0.text = currentQuestion.questionText</div><div class="">&nbsp; &nbsp; $0.numberOfLines = 0</div></div><div class="">&nbsp; &nbsp; view.addSubview($0)</div><div class="">}</div><div class=""><br class=""></div></div><div class="">This $0. certainly looks ugly and it would be great to be able to simplify this. I don't llike the following much though (dot-syntax can be ambiguos here, and using simply a method name is even worse):</div><div class=""><br class=""></div><div class=""><div class="">let questionLabel = UILabel() +=+ {</div><div class="">&nbsp; &nbsp; .textAlignment = .Center</div><div class="">&nbsp; &nbsp; .font = &nbsp;UIFont(name:"DnealianManuscript", size: 72)</div><div class="">&nbsp; &nbsp; .text = currentQuestion.questionText</div><div class="">&nbsp; &nbsp; .numberOfLines = 0</div><div class="">&nbsp; &nbsp; view.addSubview($0)</div><div class="">}</div></div><div class=""><br class=""></div><div class="">Actually I would be happy with something like</div><div class=""><br class=""></div><div class=""><div class="">let questionLabel = UILabel() .{</div><div class="">&nbsp; &nbsp; ..textAlignment = .Center</div><div class="">&nbsp; &nbsp; ..font = UIFont(name:"DnealianManuscript", size: 72)</div><div class="">&nbsp; &nbsp; ..text = currentQuestion.questionText</div><div class="">&nbsp; &nbsp; ..numberOfLines = 0</div><div class="">&nbsp; &nbsp; view.addSubview($0)</div><div class="">}</div></div><div class=""><br class=""></div><div class="">Other thoughts?</div><div class=""><br class=""></div><div class="">&nbsp;&nbsp;</div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=r5jpKsi6nat7oa43lpCLi5GRGm2utDkbDscuFklXZ2cxud9iRxsZ36zHq7XlPj9-2BOixzAQAUIKv817EfMPap26bUo4Vp7fmXyVAk3kGoXDFbxviOOjJN4IhLbXEbLBgeaEWnLntESKUKKtxs15npR33Hf0fzcj0YKh4IB-2BoUKA5SrRpArMzvl2386L5kt-2Bch5TR24-2FB9K3KdjUboRdcES55hY7En6zqMtl7SJ055yJM-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<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="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAdai3s-2FkRPAvf1za8N5R-2B1jnAyO-2FHtUWzsE-2BWTAgvDkqSU3w1XQkKeLicXoS7eG8WLt-2FDBbC1iaLmHJJ1C7TakvsT912UArlIUPnqkknS-2FiHw8ttFcfifqVuE9YOTc23ybs-2BMcg0MCkj3LI3wCVMvSuBhdnkUPvjcJhVv9FykERUOhLWbbIfj-2FkwD-2FpsiZmJOk-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">

</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>