<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><i class="">On Mar 14, 2016, at 8:36 PM, Patrick Pijnappel via swift-evolution <<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">swift-evolution at swift.org</a>> wrote:</i></pre><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">The only question is (as Sean mentioned) how this combines with the syntax
for setter access level, e.g. the current private(set). Options:
- Unnamed 2nd argument, giving private(file), private(file, set),
private(set).
- Named 2nd argument, giving e.g. private(file), private(file, accessor:
set), private(accessor: set). Less ambiguity but longer.
- Not using multiple arguments, but that'd probably break consistency with
the other unification efforts going on to make everything look like
function calls.</pre></blockquote><div class="">What about the following 3 forms?</div><div class=""><br class=""></div><div class="">private(file) //both setter and getter have file scope</div><div class="">private(set: file) //setter has file scope. Equivalent to current “private(set)"</div><div class="">private(get: module, set: file) //getter has module scope & setter has file scope</div><div class=""><br class=""></div><div class="">It is a bit weird, but we should probably also allow “public" in that last form: private(get: public, set: module)</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jon</div></body></html>