I think internal as default is bad, because it discourages encapsulation.

Building scalable software components relies on hiding implementation details 
to create layers of abstraction. It’s a fundamental principle of 
object-oriented software design. Most other OOP languages have private default.

The linked doc doesn’t explain the advantages of internal as default in detail:

> By default, most entities in a source file have internal access. This 
> optimizes for the most common case—a single-target 
> application project—while not accidentally revealing entities to clients of a 
> framework module.

Optimizes for what? Build time? Brevity?

Knut

> Have your read
> https://github.com/apple/swift/blob/master/docs/AccessControl.rst?
> 
> I prefer the current rationale behind "internal" by default.
> 
> Stephen
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to