-
Notifications
You must be signed in to change notification settings - Fork 1.7k
About the assignment of private member variables #40523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dart currently only has library-private declarations. The idea is that you can trust the current library because you are writing it yourself, and if you want a stricter access, you can create a library with just the one class, then only that class can see its own private variables. As such, it's adequate as a containment mechanism. We are considering whether there are access patterns with stronger protections that we can allow in some situations, fx in dart-lang/language#757. |
Thank you very much for your reply! Restrict to the current object, may be are access patterns with stronger protections !!! |
Thanks for the issue. Closing this in favor of dart-lang/language#757 |
I very like the Dart lang!
But the assignment of private member variables of the class is restricted to the current file, it's strange. Strongly recommended to restrict it to the current class !!!
The text was updated successfully, but these errors were encountered: