• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSRunningApplication executableURL issue in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRunningApplication executableURL issue in Swift


  • Subject: Re: NSRunningApplication executableURL issue in Swift
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 11 Mar 2015 02:25:08 -0500

On Mar 11, 2015, at 1:07 AM, Quincey Morris <email@hidden> wrote:
>
> On Mar 10, 2015, at 22:57 , email@hidden wrote:
>>
>> This is one extra thing you have to really get used to with Swift. You learn Swift, then learn that it effectively requires some constant special handling for NSObject's descendants.
>> If you're using the frameworks that's a lot of optionals and implicitly unwrapped optionals.
>
> It’s not the optionals that are the problem, nor the implicit unwrapping. Those things are just the symptoms in this case.
>
> The problem I was referring to was implicit forced downcasting. It seems so arbitrary — both the fact that it downcasts without provocation, and the (apparent, potential) randomness of what it downcasts to.

You know, this sounds like a good candidate for a collection contents annotation, similar to the nullability annotations that were recently added to Xcode. If there was a way to notate in an Objective-C header that this method returns an NSArray of NSStrings instead of just an NSArray of anything, it would make using Objective-C objects from Swift a lot easier.

I made a Radar: http://openradar.appspot.com/20118084 <http://openradar.appspot.com/20118084> and here it is for Apple folks: rdar://20118084

Charles
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSRunningApplication executableURL issue in Swift
      • From: Quincey Morris <email@hidden>
References: 
 >NSRunningApplication executableURL issue in Swift (From: Bill Cheeseman <email@hidden>)
 >Re: NSRunningApplication executableURL issue in Swift (From: Roland King <email@hidden>)
 >Re: NSRunningApplication executableURL issue in Swift (From: Bavarious <email@hidden>)
 >Re: NSRunningApplication executableURL issue in Swift (From: Quincey Morris <email@hidden>)
 >Re: NSRunningApplication executableURL issue in Swift (From: email@hidden)
 >Re: NSRunningApplication executableURL issue in Swift (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSRunningApplication executableURL issue in Swift
  • Next by Date: Re: NSRunningApplication executableURL issue in Swift
  • Previous by thread: Re: NSRunningApplication executableURL issue in Swift
  • Next by thread: Re: NSRunningApplication executableURL issue in Swift
  • Index(es):
    • Date
    • Thread