<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 20 Nov 2017, at 21:10, Chris Lattner 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 20, 2017, at 10:50 AM, Slava Pestov 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; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 20, 2017, at 1:39 PM, Chris Lattner 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=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">It is straight-forward (and fits very very naturally into the Swift call model) to support the second one as an atomic thing, which is I think what you’re getting at.<span class="Apple-converted-space">&nbsp;</span></span></div></blockquote></div><br class=""><div class="">What if you write ‘let fn = obj.method’?</div></div></div></blockquote><br class=""></div><div class="">That’s related to the DynamicMemberLookup proposal. &nbsp;I’m not familiar with Ruby, but it sounds like the implementation would end up calling&nbsp;rb_iv_get/set to manipulate instance variables. &nbsp;Is that your question or are you asking something else?</div></div></div></blockquote><div><br class=""></div><div>I don’t think that’s what he is asking. If `method` is indeed a method, then `obj.method` in Ruby would return the method as a `Proc` (If I’m not mistaken), ready to be called, very similarly to how it works in Swift:</div><div><br class=""></div><div>class Foo {</div><div>&nbsp; &nbsp; func bar(_ a: String) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print(a)</div><div>&nbsp; &nbsp; }</div><div>}</div><div><br class=""></div><div>let foo = Foo()</div><div>let b = foo.bar</div><div>b()</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="">-Chris</div><div class=""><br class=""></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="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>