[swift-users] Protocol associated type constraints in classes and structs ?
Trevör Anne Denise
trevor.annedenise at icloud.com
Fri Feb 10 11:06:12 CST 2017
> Le 10 févr. 2017 à 18:04, Trevör Anne Denise <trevor.annedenise at icloud.com> a écrit :
>
> Hi Matthew,
>
> Thanks for this quick reply, happy to see that this is something the community is working on, this will make protocols even more useful!
>
> Since this isn't implemented yet, I am wondering what would be the best approach to my problem with the current Swift version...
> Currently since there is no valid default implementation for my methods I use closures (at init time, that then get called by the methods) to let the user of my classes choose his implementation, this is the safest approach I could think of but its isn't pretty and I'm not sure that this really is the best approach...
>
> Trevör
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170210/554e669b/attachment.html>
More information about the swift-users
mailing list