This is an intriguing proposal. There are parts I like, and parts that I
will have to think about more before drawing an opinion.

Personally, I would like to see public classes be inheritable, public
protocols be conformable, and public enums be switchable, unless specified
otherwise. However I will defer to those who have more experience writing
libraries.

On a first read-through, a few things stand out to me:

1. There are still five basic access levels: scope, private, internal,
public, and open. I think this is too many, and would prefer to just have
private, internal, and public.

2. The default is listed as “submodule”. I think the default should always
be “module”, and restriction to a submodule should be explicit.

3. There is still a file-specific access level. I think this should be
removed in favor of the submodule level. If submodules can be nested then
there is no loss of expressivity, because a file could be made its own
sub-submodule.

4. The proposal keeps a scope-based access level, which I think is
unnecessary.

All that said, there is a lot to like about this model, and I will let the
ideas percolate.

Nevin
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to