Just had an idea for a different approach for access levels (as if things 
aren't complicated enough ;-) - but I'm only brainstorming here):
The problem of access levels isn't limited to programming — file systems have 
to deal with it as well.
So, ignoring ACLs for a moment, imagine

protected x: Int
protected(set) public y: Int

would be expressed as

module(read, write) x: Int
public(read) y: Int

As far as I can see, this syntax is less convenient, but could allow things 
like "public(override)" to express that a method can't be called outside the 
module, but still can be overridden by subclasses.
Any thoughts on this?

Tino
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to