Draft guide for id-as-Any migration and known issues


(Joe Groff) #1

Hi everyone. SE-0116 should be landing in snapshots soon, which changes how Objective-C APIs import into Swift. Instead of relying on special implicit conversions to AnyObject, we now import the ObjC APIs using `Any` to get the same effect without special language rules. I've written up a draft guide about the kinds of changes necessary, along with some known issues. I'd also like to gather feedback from anyone who's picked up the snapshot about their experiences to make sure we address any pain points introduced by the changes. Thank you for any feedback you can provide!

-Joe

id-as-Any-migration.md (6.99 KB)


(Joe Groff) #2

I've also posted the document as a gist, to gather updates as I collect them:

https://gist.github.com/jckarter/5ffa9ba75050b94cd2cf9092b332a866

-Joe

···

On Aug 1, 2016, at 11:46 AM, Joe Groff via swift-users <swift-users@swift.org> wrote:

Hi everyone. SE-0116 should be landing in snapshots soon, which changes how Objective-C APIs import into Swift. Instead of relying on special implicit conversions to AnyObject, we now import the ObjC APIs using `Any` to get the same effect without special language rules. I've written up a draft guide about the kinds of changes necessary, along with some known issues. I'd also like to gather feedback from anyone who's picked up the snapshot about their experiences to make sure we address any pain points introduced by the changes. Thank you for any feedback you can provide!

-Joe

<id-as-Any-migration.md>_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Honza Dvorsky) #3

Thanks Joe!

Does this mean NSJSONSerialization in Foundation will now work with native
Swift dictionaries/arrays? That would be a great if so.

Honza

···

On Tue, Aug 2, 2016 at 1:05 AM Joe Groff via swift-users < swift-users@swift.org> wrote:

I've also posted the document as a gist, to gather updates as I collect
them:

https://gist.github.com/jckarter/5ffa9ba75050b94cd2cf9092b332a866

-Joe

> On Aug 1, 2016, at 11:46 AM, Joe Groff via swift-users < > swift-users@swift.org> wrote:
>
> Hi everyone. SE-0116 should be landing in snapshots soon, which changes
how Objective-C APIs import into Swift. Instead of relying on special
implicit conversions to AnyObject, we now import the ObjC APIs using `Any`
to get the same effect without special language rules. I've written up a
draft guide about the kinds of changes necessary, along with some known
issues. I'd also like to gather feedback from anyone who's picked up the
snapshot about their experiences to make sure we address any pain points
introduced by the changes. Thank you for any feedback you can provide!
>
> -Joe
>
> <id-as-Any-migration.md>_______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users