<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 8 avr. 2016 à 14:47, Jonathan Hull via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Interesting proposal, but I wanted to mention a couple of potential issues off the top of my head. I know when I was using optional requirements in Objective C, I would often use the presence/lack of the method (not just whether it returned nil) in the logic of my program. I used the presence of a method as a way for the implementor of a delegate to naturally communicate whether they wanted a more advanced feature. The absence of the method itself is information which can be utilized, not just whether it returns nil, and I believe that is part of what people are asking for when they say they want optional methods in Swift.</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Couldn’t agree more.</div><div class=""><br class=""></div><div class="">An telling example is NSFetchedResultsControllerDelegate.controller(_:didChangeObject:atIndexPath:forChangeType:newIndexPath:).</div><div class=""><br class=""></div><div class="">When this method is not implemented, the NSFetchedResultsController does not have to perform the heavy computations of individual changes in a Core Data fetch request, since nobody is listening to them.</div><div class=""><br class=""></div><div class="">In today’s Swift, this lazy behavior requires an extra configuration flag.</div><div class=""><br class=""></div><div class="">Gwendal Roué</div><div class=""><br class=""></div></body></html>