[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution

Craig Cruden ccruden at novafore.com
Thu Feb 11 12:48:04 CST 2016


All algebraic terms actually infer not in place.  I don’t know of any algebra functions that mutates in place (at least not on the chalk board).  

I would actually prefer algebraic terms such as union and intersection be reserved for immutable only.  

union is the state of being united (i.e. past-tense).  

Is unioning even a word?


> On 2016-02-12, at 1:09:43, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> MHO: +1 on the intention of using less unwieldy names, but -1 on the specific solution. I fear that the current solution has some inexplicable inconsistencies and some Englishing which verges, again MHO, on Hungarianisms that others have mentioned are to be explicitly avoided.
> 
> For example, why is it intersection() but unioning()? Surely it should be either intersecting() and unioning() or intersection() and union()? Also, I understand that there's precedent elsewhere and that uniting() is not a good counterpart to union(), but unioning() is a pretty unsavory mangling of the noun. And then we have exclusiveOring(), which is just not English.
> 
> Could I propose an alternative that just came to mind? Reading about set algebra methods called to mind math class way back when. We'd say things like "take the derivative," "take the union," etc., which seems to me to imply an operation that is not in-place. "Take" is almost as short as "-ion" and "-ing" and might be more universally usable without mangling words: takeUnion(), takeExclusiveOr(), etc. It also has the advantage of calling to mind "make", which implies something constructor-like and thus not in-place.
> On Thu, Feb 11, 2016 at 11:38 AM Dave Abrahams via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
> Hi All,
> 
> The API guidelines working group took up the issue of the InPlace suffix
> yesterday, and decided that it was not to be used anywhere in the
> standard library.  We are planning to apply the changes shown here
> <https://gist.github.com/dabrahams/d872556291a3cb797bd5 <https://gist.github.com/dabrahams/d872556291a3cb797bd5>> to the API of
> SetAlgebra (and consequently Set) to make it conform to the guidelines
> under development.
> 
> Comments welcome as usual,
> 
> --
> -Dave
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> 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/20160212/46f10e24/attachment.html>


More information about the swift-evolution mailing list