Re: [swift-users] ?? operator question

2016-04-19 Thread zh ao via swift-users
Thanks for your explanation. I still think the compiler should not be that smart, causing only itself could understanding what is going on. It will be a nightmare. Owen On Tue, Apr 19, 2016 at 7:09 PM, Marco Feltmann via swift-users < swift-users@swift.org> wrote: > Just guessed since I try to

Re: [swift-users] Nil coalescing operator (??) and function vars

2016-04-19 Thread Chris Lattner via swift-users
> On Apr 18, 2016, at 11:42 AM, Peter Eddy via swift-users > wrote: > > Hello, > > I'd like to understand why I'm unable to use the nil coalescing operator with > functions. > > For example, I'd like to write a function that takes an optional function as > a

Re: [swift-users] ?? operator question

2016-04-19 Thread Jens Alfke via swift-users
> On Apr 19, 2016, at 4:09 AM, Marco Feltmann via swift-users > wrote: > > "But wait a sec, how can NSFount(name: "", size: 0) result in an NSNumber?" > you may ask. > I don't now. > The behaviour of NSFonts +fonttWithName:size: for empty/not found font name > is not

[swift-users] Is there any profiling tool to profile swift application in Linux platform?

2016-04-19 Thread Zhaochuanfeng via swift-users
Does anyone know if there is any profiling tool to profile swift application in Linux platform? I need do some tuning on swift application, but I can not find the performance bottleneck efficiently. Thanks, Chuanfeng ___ swift-users

Re: [swift-users] ?? operator question

2016-04-19 Thread Marco Feltmann via swift-users
Just guessed since I try to separate Swift from Objective-C frameworks. Am 19.04.2016 um 03:15 schrieb zh ao: I don't think NSNumber is OK here. As t1 is a struct not a literal value. In fact t1 in an OPTIONAL struct. That means it can point to anything from `nil` to Int Struct, NSInteger and