I disagree about the back-conversion being different. I would've just as easily made a property in CasualAnswer that returns a Bool. The fact that its implemented as an extension of Bool is purely cosmetic and avoids namespace clutter.
Also, it doesn't make sense to add semantics to the grouping based on the usage of the interface. If the interface is supposed to be used internally, there are access modifiers for that. > On Aug 2, 2017, at 8:38 PM, Taylor Swift <kelvin1...@gmail.com> wrote: > > i would have written it like this > <https://gist.github.com/kelvin13/ba42b620f80ee94fbb0d0841056aac97 > <https://gist.github.com/kelvin13/ba42b620f80ee94fbb0d0841056aac97>> > > On Wed, Aug 2, 2017 at 12:34 PM, Gor Gyolchanyan > <gor.f.gyolchan...@icloud.com <mailto:gor.f.gyolchan...@icloud.com>> wrote: > >> On Aug 2, 2017, at 7:31 PM, Tino Heth <2...@gmx.de <mailto:2...@gmx.de>> >> wrote: >> >> >>> Consider these two alternative ways of writing the same code: >>> https://gist.github.com/technogen-gg/17b6d5e13c13080850dceda28cfe1caa >>> <https://gist.github.com/technogen-gg/17b6d5e13c13080850dceda28cfe1caa> >> Great example — the first is better. >> But not because of extensions: >> // MARK: - String Compatibility > > You missed the entire point. > Here, I fixed it for you: > https://gist.github.com/technogen-gg/17b6d5e13c13080850dceda28cfe1caa > <https://gist.github.com/technogen-gg/17b6d5e13c13080850dceda28cfe1caa> > >
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution