[swift-evolution] What would public/open mean for a subtype? (was: Enums and Source Compatibility)

Daryle Walker darylew at mac.com
Fri Aug 11 20:23:52 CDT 2017


> On Aug 9, 2017, at 3:57 PM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I’d very much in favour of a consistent access modifiers across the whole language and eliminate exclusive `open`. `open/public` protocols are more than welcome. Plus it’s already has been said that Swift will potentially support subtyping for value type in some future, where we’ll yet again would need to align what `public` and `open` will mean. So I’d appreciate all the steps that could already be made now to align their meaning as much as it’s possible to this moment.

I have a proposal for “alternative types,” which can fulfill the “strong typedef” desired feature from C++. Since I changed from a custom initialization interface to RawRepresentable, I can do conditional translation to the new type, i.e. implement subtypes. (It can also do quotient types.) What do you mean by needing to figure out what public/open mean?

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170811/b923a303/attachment.html>


More information about the swift-evolution mailing list