On Jan 13, 2018, at 12:06 PM, Karl Wagner via swift-evolution <swift-evolution@swift.org> wrote: > >> On 12. Jan 2018, at 20:54, Alejandro Martinez via swift-evolution >> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote: >> >> I wouldn't go as far as to ask to fade out ! but in all my code I end >> up doing == false just for readability. That ! knows who to hide >> himself too well :P >> > > Yeah so do I. ! is a very narrow character and totally changes the meaning of > the logic. > > That said, I can’t come up with a clearer name than “== false”. inverted() > isn’t helpful. toggle() on a mutable Bool is good, though. > > - Karl
>> Nate: >> I would have gone straight to a proposal, but I think we can do some >> bikeshedding about the name of `toggle`? >> >> Another verb that could work is `invert`. I prefer `toggle()`/`toggled()` to `invert()`/`inverted()`. I could go on about why but I'm not 100% that this extension adds sufficient utility that it passes the inclusion bar. I would vote against adding them under either name. I feel more strongly about `.isTrue`/`.isFalse`. I don't think we need them. -- E
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution