Does private(expr) create a private storage block?

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Jan 19 15:57:54 PST 2012


I think private specs are a bit weak right now ... or maybe I did not get
them properly ...

   1. what's the expected behavior with mixins ( borrowed method from
   different classes ) ?
   2. what if Object.create(objectWithPrivates, descriptor) ? would
   descriptor methods be able to invoke objectWithPrivates.method() with
   private(this) access in the function body? If yes, would that
   private(this) refer to the objectWithPrivates? This would violate the
   objectWithPrivates private concept, isn't it?
   3. are privates exportable? method() {return private(this)}
   4. are private properties, not private anymore once extracted,
   exportable? method(){return private(this).whatever}
   5. what about a single block in the Class definition such private {c, i
   = 0, storage = {}, whatever} so that these are pre defined in a single
   place and callable across the class scope without requiring usage of
   private(this) but bound to the current context rather than shared across
   all instances?

More may come up soon :-)

br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/5cab2d2f/attachment.html>


More information about the es-discuss mailing list