[swift-corelibs-dev] Mark NSUnimplemented functions as unavailable.

Sergej Jaskiewicz jaskiewiczs at icloud.com
Wed May 10 18:01:10 CDT 2017


I was wondering why cannot we just mark all the methods/properties/functions in Swift Foundation that are NSUnimplemented or call a subroutine that is NSUnimplemented like this:
 
@available(*, unavailable, message: “foo is not implemented yet”)
func foo() { NSUnimplemented() }

In this case we can be sure at compile time that we don’t use code that will definitely crash.


More information about the swift-corelibs-dev mailing list