<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="">My 5c on this topic: I would be ok with adding a directive like @requiredSuper (even though I am afraid it will be abused). However, I am very much agains any more precise annotations or implicit super calls. I do not think it adds much utility to the language, however it most certainly allows more ways to mess with the users of your library. <div class=""><br class=""></div><div class="">Best, </div><div class=""><br class=""></div><div class=""> Taras<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Feb 2016, at 10:02, Haravikk via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 23 Feb 2016, at 00:51, Kyle Sherman via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">@haravikk: I still don’t see a reason to have a parameter for saying that it is required, since as we both agreed, it makes sense that only when the attribute is defined, is it required. Having the attribute declared but not have required would basically be invalid. I think baking it into the name like I originally suggested is probably best, as @super by itself is probably not explicit enough. The naming of these attributes and casing are being debated in a different thread, so I think I will just submit my suggestion with the idea that it can be corrected to fit what they decide in the other thread.</div></div></div></blockquote><br class=""></div><div class="">My reasoning was that it may make sense to have a distinction between required and other restriction types, for example:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class=""><b class="">optional</b>: super call can be included if desired (this is the default, but IMO before/after should default to being requirements, so this would be useful for changing that).</li><li class=""><b class="">required</b>: super call *must* be included or an error is produced</li><li class=""><b class="">warn</b>: downgrades errors to warnings, implies required by default (i.e- super call *should* be included or a warning is produced)</li><li class=""><b class="">replace</b>: super call should not be included or an error is produced (i.e- the requirement is that overriding methods must be a total replacement)</li></ul><div class=""><br class=""></div><div class="">While the proposal doesn’t have to push for these up front, I think that they still make sense as possible extensions of the feature, and adding @warnSuper, @optionalSuper etc. would make things more unwieldy. But the added flexibility would be very useful, for example:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>@super(optional, before)<span class="Apple-tab-span" style="white-space:pre">        </span>// super call isn’t required, but if it is included it must come first.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>@super(replace, warn)<span class="Apple-tab-span" style="white-space:pre">                </span>// downgrades replace to a warning, so a developer can still use the super call if they like, but should be very sure they know what they’re doing.</div><div class=""><br class=""></div><div class="">Personally I think @super is clear enough, though @includeSuper or such may be more-so. I just think that @requireSuper is too specific, especially if the default for the proposal is to generate a warning, since as mentioned we may want to push an error if we know that our parent class will break horribly if its method(s) aren’t called.</div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>