[swift-corelibs-dev] NSArray.descriptionWithLocale implementation

Tony Parker anthony.parker at apple.com
Mon Jan 4 13:28:58 CST 2016

Hi Eugene,

Interesting question. I think we may have to introduce a default implementation of -descriptionWithLocale:indent: which calls -descriptionWithLocale:, which has a default implementation of calling -description. 

It may be the case that we then have to limit the behavior to subclasses of NSObject.

- Tony

> On Dec 21, 2015, at 8:57 AM, Eugene Gubin via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> Documentation says what it checks for item to respond to specific selectors. There are no selectors in Swift, so new implementation should check for protocol conformance instead, I guess. Any ideas? Should new protocol be introduced?
> Class reference:  https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/#//apple_ref/occ/instm/NSArray/descriptionWithLocale:indent <https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/#//apple_ref/occ/instm/NSArray/descriptionWithLocale:indent>:
>  _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> 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/20160104/2c17fcc2/attachment.html>

More information about the swift-corelibs-dev mailing list