Class private fields and methods #4253
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-not-planned
Closed as we don't intend to take action on the reported issue
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by domi...@google.com
Support class private fields and methods.
Proposal for syntax: Double-underscore prefix. Eg:
class Point {
num __x, __y, __z;
Point(this.__x, this.__y, this.__z);
...
}
When writing larger scale apps, it is important to be able to define class APIs for public use (often just one or two methods), and the APIs that should be available for library implementation (the majority of the API), and the private implementation details of a class. The distinction between the last two is not currently present but will aid developers who read code in understanding the original intent.
The text was updated successfully, but these errors were encountered: