[swift-evolution] SetAlgebra naming update

Howard Lovatt howard.lovatt at gmail.com
Thu Mar 24 15:55:58 CDT 2016


I would suggest xxxing and xxx naming like sorting and sort, e.g.:

    y  = x.unioning(z)
    x.union(z)

The consistency of naming is more important to me than correct English. The
reason for this preference is that it quickly becomes 2nd nature to know
the names of variations and because the names begin with the same root and
are therefore code completion friendly.

On Friday, 25 March 2016, Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:

>
> Just an update:
>
> The naming guidelines working group went back into negotiation over
> the shape of SetAlgebra (and thus, Set and OptionSet) for
> Swift 3, and reached a new consensus.  We intend to bring forward a
> proposal for the API shown here:
>
>   http://dabrahams.github.io/swift-naming/SetAlgebra-Math.html
>
> and to update the guidelines to suggest using the "form" prefix to
> create a verb phrase for a mutating method when the operation is
> fundamentally non-mutating and described by a noun.
>
> Regards,
>
> --
> Dave
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <javascript:;>
> https://lists.swift.org/mailman/listinfo/swift-evolution
>


-- 
-- Howard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160325/3d0dc2a4/attachment.html>


More information about the swift-evolution mailing list