[swift-evolution] 'Public' class visibility specifiers

Joanna Carter joanna at carterconsulting.org.uk
Mon Feb 20 11:17:48 CST 2017

> Le 20 févr. 2017 à 18:07, Vladimir.S <svabox at gmail.com> a écrit :
> With 'public' we can't have subtypes outside of the module, but can have subtypes inside the module. With 'final' you can't have subtype even inside module.
> That was the main idea, that your module knows all the possible subtypes of some type.

If you want to limit visibility of anything to within the module, what's wrong with internal?

Final isn't about visibility, it's about restriction of inheritance, whether the class is visible outside the module or not

Joanna Carter
Carter Consulting

More information about the swift-evolution mailing list