[swift-corelibs-dev] Unavailability macros for APIs that aren't going to be implemented on Linux?
Ian Partridge
ian at poncho.org.uk
Wed Aug 2 04:14:09 CDT 2017
I think a compile-time failure is appropriate and most helpful to a
developer.
On 2 August 2017 at 09:38, Alex Blewitt via swift-corelibs-dev <
swift-corelibs-dev at swift.org> wrote:
>
> On 28 Jul 2017, at 20:30, Alex Blewitt via swift-corelibs-dev <
> swift-corelibs-dev at swift.org> wrote:
>
> In the meantime I'll take a stab next week at proposing some
> unavailability annotations for some of the stuff which almost certainly
> doesn't make sense, to do with Mach ports and NSZone.
>
>
> I've created a pull request which adds NSUnsupported, and uses that to
> wrap NSPort and NSMessagePort:
>
> https://github.com/apple/swift-corelibs-foundation/pull/1150
>
> What do you think? Should we use 'deprecated' (so that it's a warning) or
> 'unavailable' (so that it's a compile time error)?
>
> + @available(*,deprecated,message:"Not available on non-Darwin platforms")
> + @available(*,unavailable,message:"Not available on non-Darwin platforms"
> )
>
> Alex
>
>
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
--
Ian Partridge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20170802/f594f7b6/attachment.html>
More information about the swift-corelibs-dev
mailing list