Re: NSRunningApplication executableURL issue in Swift
Re: NSRunningApplication executableURL issue in Swift
- Subject: Re: NSRunningApplication executableURL issue in Swift
- From: Quincey Morris <email@hidden>
- Date: Wed, 11 Mar 2015 20:55:09 +0000
On Mar 11, 2015, at 10:53 , Charles Srstka <email@hidden> wrote:
>
> It would also be much more work.
Actually, I don’t think so, once you follow through the argument…
Even today, the ability to cross-translate between Swift an Obj-C exists (within the Swift compiler, though used only in particular bridging contexts). Within certain limits of interoperability, this means that the “real” SDK headers could be in Swift language or Obj-C language, with on-the-fly translation in one compiler or the other. (Because, by definition, what’s in the SDK is limited to what’s interoperable.) Conceptually at least, that’s unrelated to what language** the frameworks are implemented in.
Thus, my argument goes, if you desire to go through the process of “annotating” the SDK for something like array member types, you could either extend Obj-C with annotation syntax, or you could simply start with and use existing Swift syntax.
Either way, the bulk of the work is auditing. That is, it’d be necessary to re-audit the SDK headers (just like is being done now, or perhaps has been done recently, I’m not sure how far along this is). The big task is the necessary work of *finding* what needs to be changed. The actual changes are relatively small in number.
Of course, such a task isn’t literally possible today, though we seem to be close to feasibility. Off the top of my head, I’d guess the biggest problem would be ivars defined in public SDK headers. I suspect that the 32-bit OS X ABI would have to be abandoned, since I think think that’s the only reason those ivars are still there.
** Frameworks that are untranslatably C-based would not be interoperable with Swift anyway, so their headers would have to stay as they are.
_______________________________________________
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