tc39 / proposal-class-fields

Orthogonally-informed combination of public and private fields proposals
https://arai-a.github.io/ecma262-compare/?pr=1668
1.72k stars 113 forks source link

private field and protected field #311

Closed 1316346949 closed 4 years ago

1316346949 commented 4 years ago

image

ljharb commented 4 years ago

See #86 - the problem with protected fields has very little to do with syntax.

tl;dr: JS only has two kinds of "visibility": reachable and unreachable. The word "public" and "private" may suggest that it's the same as "access levels", but it's not.