From: Allen Wirfs-Brock [mailto:al...@wirfs-brock.com] 

> no, not in the way that I believe you intend

Can you explain why? Is the design you and Kevin have been working on based on 
lexical restrictions?

> It isn't that  subclass specific private state "initialization" must be 
> performed in the constructors. In the design that Kevin and I have been 
> working on,  the total number of private state slots (and some meta data for 
> each one) must be knowable and fixed when an object is allocated   (in other 
> words, private slots cannot be added to an object after it is initially 
> allocated).

This seems like it then compares poorly with weak maps for private state. It 
makes sense as a strong mode restriction, but not as a default one...

Anyway, the design for upgradable custom elements is based around the idea that 
subclasses would never need to customize the allocator, thus allowing the UA to 
do their magical allocation of C++ HTMLElement stuff. If private state requires 
customizing the allocator, I am not sure that custom elements would be able to 
take advantage of it anyway... I suppose it depends on the details of the 
proposal.

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to