[swift-evolution] Making `.self` After `Type` Optional

Haravikk swift-evolution at haravikk.me
Thu Mar 10 05:00:51 CST 2016

> On 9 Mar 2016, at 19:23, Tanner Nelson via swift-evolution <swift-evolution at swift.org> wrote:
> - Require spaces around infix operators and no spaces around generics

While I know some people’s preference is for spacing to be left to linters and other tools, I do think that requiring space around operators is a good requirement to make; it should make it easier for the compiler, and easier for readability, plus it actually fits with Swift’s goal of avoiding mistakes by making it harder to mistakenly use negation vs subtract and other weird cases (like this particular one).

I’d say that all operators taking two arguments should have whitespace on either side, while prefix and postfix operators shouldn’t be allowed to have trailing and leading space respectively (the latter may already be the case, I can’t check just now).

That said, I’d say that removing comparison operators from types make sense too, as I can’t imagine when you’d need to do this?

So put in the “little bit of everything” camp ;)

More information about the swift-evolution mailing list