[swift-corelibs-dev] Query on NSLog

Chris Bailey BAILEYC at uk.ibm.com
Wed Jul 6 06:45:32 CDT 2016


Agreed - being consistent is key. The Foundation Reference currently 
documents the Swift API for NSLogv() as:

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/#//apple_ref/c/func/NSLogv
        func NSLogv(_ format: String, _ args: CVaListPointer)

If that's still correct, then I guess that's what we should be adding

Chris




From:   Luke Howard <lukeh at padl.com>
To:     Chris Bailey/UK/IBM at IBMGB
Cc:     Tony Parker <anthony.parker at apple.com>, 
swift-corelibs-dev at swift.org
Date:   06/07/2016 12:31
Subject:        Re: [swift-corelibs-dev] Query on NSLog



OK, we should fix the function signature to make it identical then 
(currently it does not take an argument list), and perhaps define NSLogv() 
as well.

On 6 Jul 2016, at 8:36 PM, Chris Bailey <BAILEYC at uk.ibm.com> wrote:

The Darwin overlay contains: 

https://github.com/apple/swift/blob/master/stdlib/public/SDK/Foundation/Foundation.swift#L918
: 
public func NSLog(_ format: String, _ args: CVarArg...) { 
  withVaList(args) { NSLogv(format, $0) } 
} 

So for consistency it would make sense to expose it on other platforms as 
well. 

Chris




From:        Tony Parker via swift-corelibs-dev <
swift-corelibs-dev at swift.org> 
To:        Luke Howard <lukeh at padl.com> 
Cc:        swift-corelibs-dev at swift.org 
Date:        06/07/2016 00:57 
Subject:        Re: [swift-corelibs-dev] Query on NSLog 
Sent by:        swift-corelibs-dev-bounces at swift.org 



Frankly, I think I just forgot to put a stub for it when we put out the 
first set of APIs. 

- Tony 

On Jul 5, 2016, at 4:54 PM, Luke Howard <lukeh at padl.com> wrote: 

I added NSLog for NSKeyedArchiver so the output formatting would more 
closely match Darwin, but I punted whether to make it public. 

On 6 Jul 2016, at 5:42 AM, Tony Parker via swift-corelibs-dev <
swift-corelibs-dev at swift.org> wrote: 

Hi Sai, 

Out of curiosity, why NSLog instead of Swift’s print function? 

- Tony 

On Jun 27, 2016, at 4:37 AM, Sai Kanduri via swift-corelibs-dev <
swift-corelibs-dev at swift.org> wrote: 

Hi All, 
  
Currently NSLog  has only one internal function  NSLog()  which can be 
used only by Foundation classes.Can this be made available as a public API 
? 
  
  
Thanks & Regards, 
  
Sai Hema,Java L3 Support 

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev at swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev at swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 

-- 
www.lukehoward.com
soundcloud.com/lukehoward 

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev at swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev



--
www.lukehoward.com
soundcloud.com/lukehoward



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


More information about the swift-corelibs-dev mailing list