[swift-evolution] [Review] SE-0006 Apply API Guidelines to the Standard Library

Ben Rimmington me at benrimmington.com
Fri Feb 5 14:29:08 CST 2016


Proposal link:

<https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md>

> precondition was renamed to require.

In the Standard Library, "- Requires:" appears in documentation comments more often than "- Precondition:" or "- Postcondition:", so renaming the function makes sense.

However, I think the Xcode Markup Formatting Reference should be updated to reflect this usage. The current description is:

> Use the field to add requirements such as frameworks for using the symbol.
> 
> /**
> An example of using the requires field
> 
> - requires: Contacts framework
> - requires: OS X version 10.11 or better
> */

<https://developer.apple.com/library/mac/documentation/Xcode/Reference/xcode_markup_formatting_ref/Requires.html>

-- Ben


More information about the swift-evolution mailing list