[swift-evolution] When to use argument labels (a new approach)

Charles Constant charles at charlesism.com
Thu Feb 4 11:07:01 CST 2016

> > Even though, this code makes sense:
> >
> > *     a.moveTo( b )*
> >
> > I'd prefer to see this:
> >
> *     a.move( toPoint: b )*

The difference between this and the first example isn't a preposition;
> it's a (IMO needless) noun.  What point (NPI) are you trying to
> illustrate?

It looks like I didn't express myself well enough. My point is, it's not
entirely a "needless noun" in the context of an actual project. In
isolation, if your project only has that one function, it's needless. But,
when it's sitting there along with dozens of other functions and methods,
it's nice if you can predict which the argument labels you're looking for
will be called. Because, with my suggestion "toPoint" is  "toPoint" is
"toPoint" everywhere and with no exceptions.

FWIW, your personal style notwithstanding, we *are* standardizing on
> camelCase

oK, no more snake case. ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160204/0785db00/attachment.html>

More information about the swift-evolution mailing list