[swift-corelibs-dev] Need of inputs for NSExpression

Tony Parker anthony.parker at apple.com
Wed Jan 18 11:49:38 CST 2017


Hi Pushkar,

> On Jan 16, 2017, at 12:26 AM, Pushkar N Kulkarni <pushkar.nk at in.ibm.com> wrote:
> 
> Hi Tony, 
> 
> I have a question. 
> 
> >> Some of it is pretty tricky to implement without the dynamic behavior of ObjC though.
> I guess you were referring to something like "NSExpression(format:"FUNCTION(4.2, 'factorial')")" 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 :-) 
> Are there any known approaches? Is there any kind of general guidance you'd give here? 

Yah, that’s the problematic bit.

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.

- Tony

> 
> Thank you!
> 
> Pushkar N Kulkarni,
> IBM Runtimes
> 
> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
> 
> 
> 
> -----swift-corelibs-dev-bounces at swift.org <mailto:-----swift-corelibs-dev-bounces at swift.org> wrote: -----
> To: Nethra Ravindran <nethraravindran94 at gmail.com <mailto:nethraravindran94 at gmail.com>>
> From: Tony Parker via swift-corelibs-dev 
> Sent by: swift-corelibs-dev-bounces at swift.org <mailto:swift-corelibs-dev-bounces at swift.org>
> Date: 01/12/2017 09:44PM
> Cc: swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
> Subject: Re: [swift-corelibs-dev] Need of inputs for NSExpression
> 
> Hi Nethra,
> 
> Thanks for your interest!
> 
> 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.
> 
> - Tony
> 
>> On Jan 12, 2017, at 4:24 AM, Nethra Ravindran via swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>> wrote:
>> 
>> Hi All,
>> 
>> 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.
>> 
>> Thank you in advance for your help!
>> 
>> Regards,
>> Nethra Ravindran
>> 
>> _______________________________________________
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev <https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>
> 
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev <https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20170118/d2d3ae5a/attachment.html>


More information about the swift-corelibs-dev mailing list