[swift-evolution] abstract keyWord proposal

T.J. Usiyan griotspeak at gmail.com
Fri Dec 4 02:43:50 CST 2015

Hello David,

This sounds like something that can be accomplished with protocols and
default implementations provided in protocol extensions. If you've
watched Protocol-Oriented
Programming in Swift [Session 408]
<https://developer.apple.com/videos/play/wwdc2015-408/>, slides 168 and on,
once he begins talking about Protocol Extensions, is the relevant part. It
looks like the functionality that you've described is already present in
this feature.


On Fri, Dec 4, 2015 at 3:30 AM, David Scrève <david.screve at dlta-studio.com>

>         Hi Everyone,
>         Nice to see this new swift-evolution process….I’m not sure to
> completely understand the whole process of requesting evolutions, but I’m
> trying
> to do…
>         As I develop sort of framework, I usually have classes that I
> wanted to partially in the framework and force the user to implement others
> parts.
>         For example, I have a WebService class that manage the whole
> process to perform asynchronous call, error management.
>         This class has an abstract property that is specific for each
> WebService call.
>         Then I would like to make the URL property abstract and,
> consequently, the whole WebService class abstract : The WebService cannot
> be directly instantiated.
>         The goal of this feature would be to extend to method.
>         This behavior already exists in Java and is really useful.
>         The workaround is to make an URL property that returns invalid
> value or make assertion, but the error is only detected at runtime.
>         My proposal would be to just add a keyword before func, class or
> var. An abstract property or func should not provide implementation.
>         Regards,
> David
> _______________________________________________
> 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/20151204/bfe93fe7/attachment.html>

More information about the swift-evolution mailing list