Finding a "safety syntax" for classes

David Herman dherman at mozilla.com
Sun Mar 25 00:05:07 PDT 2012


On Mar 24, 2012, at 10:20 PM, Allen Wirfs-Brock wrote:

> On Mar 24, 2012, at 7:29 PM, Brendan Eich wrote:
> 
> I suspect Dave misinterpreted Nadav's question.  So did I, when I originally read it.

Oh, yes, thanks for the clarification. I thought he was talking about the superclass position, but indeed he was talking about the prototype methods. He was clear, I just didn't read correctly.

> To actually add a computed function as the value of a prototype object property within the class definition is pretty much the same thing as defining an arbitrary valued  prototype data property.  Defining non-method prototype properties is one of the features that we have previous been unable to reach consensus on and for that reason was intentionally excluded from the maximal-minimal proposal. As the proposal says:
> 
> "There is (intentionally) no direct declarative way to define either prototype data properties (other than methods) class properties, or instance property"
> "Class properties and prototype data properties need be created outside the declaration."

Yeah, I think this is fine and future-proof for expanding on in the future. IOW, we're not against what Nadav's asking for, we're just trying to define the base level foundation for building on in the future.

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120325/c0b20026/attachment.html>


More information about the es-discuss mailing list