wycats / javascript-decorators

2.4k stars 127 forks source link

Private state #60

Closed silkentrance closed 8 years ago

silkentrance commented 8 years ago

Please reschedule this to a future release. It is not actually a part of the decorator spec and requires additional changes to the language, i.e. #slot notation.

Besides of that, why would one need to have a WeakMap to implement private state? In C/C++, structs have been used all the time to hold the private state of an object. So, a simple {} should to the trick.

So instead of the long haul

new decorator spec -> requires #slot notation -> requires changes to the ECMAScript standard -> takes months to years to be finalized

why not go the faster way

new (extensible) decorator spec -> release now -> integrate into babel now
silkentrance commented 8 years ago

Done. Closing.