[swift-evolution] [Pitch] Introducing role keywords to reduce hard-to-find bugs

David Moore mooredev at me.com
Wed Jun 14 15:12:05 CDT 2017


I agree with omitting the extend keyword, as it does not really add anything useful to the language. The default keyword, on the other hand, seems as if it will be really useful for extending protocols. It would be useful for a handful of cases, and it further introduces safety to Swift as a whole.

On Jun 14, 2017, 3:56 PM -0400, Víctor Pimentel via swift-evolution <swift-evolution at swift.org>, wrote:
> > El 14 jun 2017, a las 20:01, David Hart via swift-evolution <swift-evolution at swift.org> escribió:
> >
> > I think this proposal is a great idea. But I would vote for the alternative of only having default and implicitly deducing extend when default is not specified: it would mimic how override works with only one keyword, it would not introduce a completely new keyword, and it would provide progressive disclosure (your usually start implementing types before going deeper in default implementations). Yes, it would generate warnings at all current default implementations, but it wouldn’t break source compatibility and would provide a lot of value for developers.
>
> +1 to adding only the "default" keyword.
>
> This would be great and very easily to fix in migrations, definitely dissipating the gray area where protocol extensions now live.
>
> --
> Víctor Pimentel
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170614/ca4b587b/attachment.html>


More information about the swift-evolution mailing list