NSArray.descriptionWithLocale implementation

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
:

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@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: NSArray | Apple Developer Documentation
_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev