<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>An interesting take on arg label/name, granted this is including destructuring of obj literals (so one level down from the method sig, but which is not without analogy to what could be done to tuples with named fields). The main point of comparison is what the type of f1 and f2 are. </div><div><br></div><div>This is in typescript, where the signatures ultimately have to translate down to javascript where everything maps to </div><div>f(p,q,r,s,t) {</div><div> var p1 = arguments.0; // is p or this</div><div> ...</div><div>}</div><div>last week i was back to writing lots of ts 1.8 code and i find the type system incredibly precise and flexible (P|Q... yeah)</div><div><br></div><div><pre style="box-sizing: border-box; overflow: hidden; padding: 1rem; margin-top: 0px; margin-bottom: 1rem; line-height: 1.4285; word-break: break-all; word-wrap: break-word; border: 1px solid rgb(204, 204, 204); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;"><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-comment" style="box-sizing: border-box; line-height: 1.6em;">// Type of f1 is (arg?: { x?: number, y?: number }) => void</span> </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-function" style="box-sizing: border-box; line-height: 1.6em;"><span class="hljs-keyword" style="box-sizing: border-box; line-height: 1.6em; font-weight: 700;">function</span> <span class="hljs-title" style="box-sizing: border-box; line-height: 1.6em; font-weight: 700;">f1</span>(<span class="hljs-params" style="box-sizing: border-box; line-height: 1.6em;">{ x = 0, y = 0 } = {}</span>) </span>{ } </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-comment" style="box-sizing: border-box; line-height: 1.6em;"><br></span></span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-comment" style="box-sizing: border-box; line-height: 1.6em;">// And can be called as:</span> </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f1(); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f1({}); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f1({ x: <span class="hljs-number" style="box-sizing: border-box; line-height: 1.6em;">1</span> }); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f1({ y: <span class="hljs-number" style="box-sizing: border-box; line-height: 1.6em;">1</span> }); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f1({ x: <span class="hljs-number" style="box-sizing: border-box; line-height: 1.6em;">1</span>, y: <span class="hljs-number" style="box-sizing: border-box; line-height: 1.6em;">1</span> }); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-comment" style="box-sizing: border-box; line-height: 1.6em;"><br></span></span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-comment" style="box-sizing: border-box; line-height: 1.6em;">// Type of f2 is (arg?: (x: number, y?: number) => void</span> </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);"><span class="hljs-function" style="box-sizing: border-box; line-height: 1.6em;"><span class="hljs-keyword" style="box-sizing: border-box; line-height: 1.6em; font-weight: 700;">function</span> <span class="hljs-title" style="box-sizing: border-box; line-height: 1.6em; font-weight: 700;">f2</span>(<span class="hljs-params" style="box-sizing: border-box; line-height: 1.6em;">{ x, y = 0 } = { x: 0 }</span>) </span>{ } </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f2(); </span></font></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><font face="UICTFontTextStyleTallBody"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">f2({}); </span></font><span class="hljs-comment" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">// Error, x not optional</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;"> </span></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;">f2({ x: </span><span class="hljs-number" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">1</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;"> }); </span></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;">f2({ y: </span><span class="hljs-number" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">1</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;"> }); </span><span class="hljs-comment" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">// Error, x not optional</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;"> </span></code><code class="language-ts hljs typescript" style="box-sizing: border-box; padding: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; display: block; overflow-x: auto;"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;">f2({ x: </span><span class="hljs-number" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">1</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;">, y: </span><span class="hljs-number" style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody; box-sizing: border-box; line-height: 1.6em;">1</span><span style="white-space: normal; background-color: rgba(255, 255, 255, 0); font-family: UICTFontTextStyleTallBody;"> });</span></code></pre><h1 id="support-for-decorators-when-targeting-es3" style="box-sizing: border-box; margin: 20px 0px 10px; font-weight: 500; line-height: 1.1;"><br></h1></div><div><div><div>Regards</div>(From<span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.294118);"> mobile)</span></div></div><div><br>On Jun 30, 2016, at 8:26 PM, Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Hello Swift community,</span><br><span></span><br><span>The review of "SE-0111: Remove type system significance of function argument labels" begins now and runs through July 4. The proposal is available here:</span><br><span></span><br><span> <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0111-remove-arg-label-type-significance.md">https://github.com/apple/swift-evolution/blob/master/proposals/0111-remove-arg-label-type-significance.md</a></span><br><span></span><br><span>Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at</span><br><span></span><br><span> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br><span></span><br><span>or, if you would like to keep your feedback private, directly to the review manager.</span><br><span></span><br><span>What goes into a review?</span><br><span></span><br><span>The goal of the review process is to improve the proposal under review through constructive criticism and contribute to the direction of Swift. When writing your review, here are some questions you might want to answer in your review:</span><br><span></span><br><span> * What is your evaluation of the proposal?</span><br><span> * Is the problem being addressed significant enough to warrant a change to Swift?</span><br><span> * Does this proposal fit well with the feel and direction of Swift?</span><br><span> * If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</span><br><span> * How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</span><br><span></span><br><span>More information about the Swift evolution process is available at</span><br><span></span><br><span> <a href="https://github.com/apple/swift-evolution/blob/master/process.md">https://github.com/apple/swift-evolution/blob/master/process.md</a></span><br><span></span><br><span>Thank you,</span><br><span></span><br><span>-Chris Lattner</span><br><span>Review Manager</span><br><span></span><br><span></span><br><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>