I would like to see a much more coherent and simple access control system
in Swift. And since the proposal to revert `private` to what it was before
was rejected, it is better that` private` means really `private`. Then -1
for this proposal.
(I think we could learn a lot from C # in this question
Some corrections and additions to my previous email:
public(open) // if open is absent, the method is “closed”
protected // (yes, we and Cocoa still use classes)
internal
private(file) // if file is absent, the method is really, really private
And one observation: protected and abstract as
Well. I really would like to see something like this in Swift:
public(open|closed)
protected // (yes, we and Cocoa still use classes)
internal
private(file)
I would like the abstract modifier to any access level because, well... We
and Cocoa still use classes. ;) It could be something like
Hello.
-1
In C# a `default` is needed because the way the language handles generics
and `null`. A value type in C# cannot be `null`, but a class can. So they
have to have a `default(T)`, something like:
`T someVariable = default(T);`.
I think we do not need this in Swift and currently I do not
today and just cannot stop now. No intention to start a war here but I
>> think everyone should ask themselves this for every proposed change to the
>> language.
>>
>> About the topic at-hand, we have to remember Swift is bridged to
>> Objective-C, which has no protec
ed change to the
> language.
>
> About the topic at-hand, we have to remember Swift is bridged to
> Objective-C, which has no protected (or abstract). How do you propose these
> protected members be bridged should the proposal pass?
> --
> From: V
Thank you all for your comments. :-)
Well... My goal is to keep the thing really simple and do not start a new
"OOP x POP" (or "something" x "other thing") war.
"Protected" access level is not a new concept at all (except for the Swift
language), so I did not propose anything preposterous.
Of
Hello.
This is the first draft. I'd like to know your opinion about it.
(I know that this subject could have been discussed before. If so, please
indicate me the correct thread to follow and interact.)
Regards,
Vanderlei Martinelli
---
Introduction
Protected access level will enable