[swift-evolution] [Pitch] Including yes/no in stdlib as aliases for true/false

Jacob Bandes-Storch jtbandes at gmail.com
Wed May 4 14:07:57 CDT 2016

It's worth looking into CoffeeScript, in which true/false, yes/no, and
on/off are all accepted.
On Wed, May 4, 2016 at 12:04 PM Erica Sadun via swift-evolution <
swift-evolution at swift.org> wrote:

> I propose adding yes and no to the standard library as aliases for true
> and false Boolean values. When answering the questions posed by Boolean
> properties and methods, "yes" and "no" may provide better fits than "true"
> and "false".  "Should this view be hidden?" "Yes!" "Does this collection
> contain the number 2?" "No!". Objective-C solved this by adding macro
> equivalents, admittedly with some attendant fuzziness because boolean
> implementation details allowed non 0/1 truth values.
> Swift on the other hand has very firm ideas about true and false. Adding
> yes and no literal aliases would enhance code readability with little cost.
> There's minimal historic support among languages for yes/no but Swift is an
> Apple-y kind of language and yes/no is an Apple-y kindness to developers.
> I performed a gmane search and did not find a previous thread on this
> subject.
> -- E
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160504/781238f5/attachment.html>

More information about the swift-evolution mailing list