It sounds like instead of .none, the .private case should behave exactly the same and the name is more consistent to the language. So:
enum Storage {
case `public` // storage synthesized and public
case `fileprivate` // storage synthesized and fileprivate
case `private` // storage not synthesized
}
but personally I would rather still keep it on the caller side which gives more flexibility and with the mix of your proposition how to describe it:
public @Lazy(storage=private) var prop
private(storage) public @Lazy var prop
This nation even though fits to the Swift "style" in my opinion has to downsides:
- It will be confusing according to the order of access level according to the property and the storage all the time for developers, so we might try to write:
private(storage) public @Lazy var proppublic private(storage) @Lazy var prop- or maybe both will be allowed which will be an additional point to the discussion in SE-0250: Swift Code Style Guidelines and Formatter
- It is a bit hard to grasp by the human at which access level at I'm trying to focus on especially in a case:
public public(storage) @Lazy var proppublic(storage) public @Lazy var prop