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

davesweeris at mac.com davesweeris at mac.com
Thu Mar 10 16:49:54 CST 2016

> On Mar 10, 2016, at 5:00 AM, Haravikk via swift-evolution <swift-evolution at swift.org> wrote:
>> 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).

-1, for the reason Joe Groff gave, plus I don’t like the idea of these kinds of special cases (or special cases in general, come to think of it).
> 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?
- Dave Sweeris

More information about the swift-evolution mailing list