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@swift.org> wrote:

>
> On 28 Jul 2017, at 20:30, Alex Blewitt via swift-corelibs-dev <
> swift-corelibs-dev@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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>


-- 
Ian Partridge
_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

Reply via email to