3 ms·
I haven't written C++ in many years, so I don't feel qualified to comment on C++. However, I have been writing Swift, every single day, since June, 2014, so I
by ChrisMarshallNY 4y ago
I haven't written C++ in many years, so I don't feel qualified to comment on C++.
However, I have been writing Swift, every single day, since June, 2014, so I may have a bit more authority, there.
In this post, I describe a rather subtle bug that can happen, because of the differences between inheritance and interface: https://littlegreenviper.com/miscellany/swiftwater/the-curious-case-of-the-protocol-default/ https://littlegreenviper.com/miscellany/swiftwater/the-curio...
It's actually something that happens to me fairly often, because I do mix them. I have learned to recognize it, when it happens. The best "cure," is to not use protocol defaults for properties and functions that I want to be implemented by inheritance hierarchies.
- meindnoch 4y agoI think you're referring to the SR-103 issue: https://github.com/apple/swift/issues/42725 https://github.com/apple/swift/issues/42725
- ChrisMarshallNY 4y agoThat looks like it! Thanks!