Friday, November 18, 2022

Swift Proposal: Function Back Deployment

SE-0376:

Unfortunately, developers who wish to both distribute an app compatible with toasterOS 1.0 and also adopt makeBatchOfToast(_:) must call the API conditionally to account for its potential unavailability[…]

[…]

Considering that the implementation of makeBatchOfToast(_:) is self contained and could run unmodified on toasterOS 1.0, it would be ideal if the ToastKit authors had the option to back deploy this new API to older OSes and allow clients to adopt it unconditionally.

[…]

Proposed solution: Add a @backDeploy(before: ...) attribute to Swift that can be used to indicate that a copy of the function should be emitted into the client to be used at runtime when executing on an OS prior to a specific version.

Previously:

Comments RSS · Twitter

Leave a Comment