> Le 11 sept. 2017 à 23:41, Gwendal Roué <gwendal.r...@gmail.com> a écrit : > > Doesn't it escalate pretty quickly into complex and ad-hoc language > constructs? > > Like everybody I like code synthesis. Like some, I'm worried that implicit > synthesis would hide a few bugs that are hard to debunk. I also agree that > developers who complain about those bugs would rightfully get the "behaves as > expected" and "RTFM" classical answers. The problem with those deserved > answers is that there's not much lesson to learn. Being bitten one, two, > three times does not reduce the probability of being bitten another time. > Programmer errors due to carelessness are the most difficult errors to > prevent, don't you all agree? > > People who use Sourcery are quite happy with AutoEquatable and AutoHashable. > I don't know of anybody who complains of those. People are happy. Nobody > types `AutoEquatable` by mistake: they get synthesis where they ask for it, > and move on their next task without thinking much more about it. Sounds like > a developer's dream, isn't it? > >> This doesn't align with how Swift views the role of protocols, though. One >> of the criteria that the core team has said they look for in a protocol is >> "what generic algorithms would be written using this protocol?" >> AutoSynthesize doesn't satisfy that—there are no generic algorithms that you >> would write with AutoEquatable that differ from what you would write with >> Equatable. > > And so everybody has to swallow implicit and non-avoidable code synthesis and > shut up?
Sorry Tony, I didn't quote your sentence properly. Gwendal
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution