<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Pushkar,<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 16, 2017, at 12:26 AM, Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" class="">pushkar.nk@in.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class="">Hi Tony, </div><div class=""><br class=""></div><div class="">I have a question. </div><div class=""><br class=""></div><div class=""><span style="font-family: 'Default Sans Serif', Verdana, Arial, Helvetica, sans-serif;" class="">>> <i class="">Some of it is pretty tricky to implement without the dynamic behavior of ObjC though.</i></span><br class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class="">I guess you were referring to something like "<span class="bp" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#cb4b16" class="">NSExpression</font></span><span class="p" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#586e75" class="">(</font></span><span class="nl" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#268bd2" class="">format</font></span><span class="p" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#586e75" class="">:</font></span><span class="s" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#2aa198" class="">"FUNCTION(4.2, 'factorial')"</font></span><span class="p" style="font-family: Courier, Monaco, monospace; font-size: 16px; box-sizing: border-box;"><font color="#586e75" class="">)</font></span>" where `factorial` is a function defined on an extension of NSNumber. Now, this translation of a string to a function handle/pointer seems quite intimidating to me, in the Swift context :-) </div><div dir="ltr" style="font-style: normal;" class="">Are there any known approaches? Is there any kind of general guidance you'd give here? </div></div></div></div></font></font></font></div></font></div></blockquote><div><br class=""></div><div>Yah, that’s the problematic bit.</div><div><br class=""></div><div>With Objective-C, we have a whole host of API that allows dynamic lookup of selectors, classes, etc. None of that exists on Linux, and I don’t think we have any reasonable replacement.</div><div><br class=""></div><div>- Tony</div><br class=""><blockquote type="cite" class=""><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class=""><br class=""></div><div dir="ltr" style="font-style: normal;" class="">Thank you!</div><div dir="ltr" style="font-style: normal;" class=""><br class=""></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">Pushkar N Kulkarni,</font></div>
<div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="serif, Times New Roman, Times, serif" class=""><i class="">Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div>
<div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;" class=""><br class=""></div></div></div></div></font></font></font></div><br class=""><br class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font color="#990099" class=""><a href="mailto:-----swift-corelibs-dev-bounces@swift.org" target="_blank" class="">-----swift-corelibs-dev-bounces@swift.org</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;" class="">To: Nethra Ravindran <<a href="mailto:nethraravindran94@gmail.com" target="_blank" class="">nethraravindran94@gmail.com</a>><br class="">From: Tony Parker via swift-corelibs-dev <swift-corelibs-dev@swift.org class=""><br class="">Sent by: <a href="mailto:swift-corelibs-dev-bounces@swift.org" target="_blank" class="">swift-corelibs-dev-bounces@swift.org</a><br class="">Date: 01/12/2017 09:44PM<br class="">Cc: <a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class="">Subject: Re: [swift-corelibs-dev] Need of inputs for NSExpression<br class=""><br class=""><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html charset=utf8">-->Hi Nethra,<div class=""><br class=""></div><div class="">Thanks for your interest!</div><div class=""><br class=""></div><div class="">Probably the best place to get started would be to take a look at our documentation about NSExpression. Some of it is pretty tricky to implement without the dynamic behavior of ObjC though.</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""></div><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 12, 2017, at 4:24 AM, Nethra Ravindran via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div style="font-family: helveticaneue; font-size: 12px;" class="">Hi All,<br class=""></div><div style="font-family: helveticaneue; font-size: 12px;" class=""><div style="font-family:helveticaneue" class=""><br class=""></div><div style="font-family:helveticaneue" class="">This is Nethra Ravindran and I’m a university student doing my internship. I would like to contribute to Swift Foundation. I have looked upon NSExpression and I am interested in contributing the implementation. I would be very thankful if I could get some pointers about it.</div><div style="font-family:helveticaneue" class=""><br class=""></div><div style="font-family:helveticaneue" class="">Thank you in advance for your help!</div><div style="font-family:helveticaneue" class=""><br class=""></div><div style="font-family:helveticaneue" class="">Regards,</div><div style="font-family:helveticaneue" class="">Nethra Ravindran</div><div style="font-family:helveticaneue" class=""><br class=""></div></div></div>_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></div></blockquote></div><br class=""></div></div><div class=""><font face="Courier New,Courier,monospace" size="3" class="">_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></font></div></swift-corelibs-dev@swift.org></div></div></font></font><br class="">
</div></blockquote></div><br class=""></div></body></html>