|
|
|
|
|
by lifthrasiir
1755 days ago
|
|
> that new "#private" thing I can agree that classes have been more or less a syntactic sugar, but private identifiers are not. The field name collision is a problem in virtually every dynamically typed language with namespace inheritance and each language has their solutions (see Python `__mangled_name` and Ruby `@instance_var`), JavaScript just happens to have another solution and that alone justifies a separate `class` syntax (since the scope of such private identifiers should be lexical). |
|
Remember, once upon a time JS was supposed to be Scheme...