Re: Harmony classes [Was: Operator overloading revisited]

2009-07-27 Thread Mark S. Miller
On Mon, Jul 27, 2009 at 2:56 AM, Tom Van Cutsem wrote: const isSameDesc(desc1, desc2) { ... } const addTrait(self, trait, opt_advice) {  [...]  if (oldDesc) {    if (isSameDesc(oldDesc, newDesc)) {       // already cool    } else {       Object.definePro

Re: Harmony classes [Was: Operator overloading revisited]

2009-07-27 Thread Brendan Eich
On Jul 27, 2009, at 2:56 AM, Tom Van Cutsem wrote: Could you point me to a page that explains the rationale behind distinguishing data properties from accessor properties? At first sight, it appears you don't need both since accessor properties can easily subsume data properties. ES5 is

Re: Harmony classes [Was: Operator overloading revisited]

2009-07-27 Thread Tom Van Cutsem
Do I get it right that a trait composition conflict is only raised upon accessing the conflicting property? In AmbientTalk, the error is signaled at composition-time (i.e. as if your addTrait method would raise an exception). What's your rationale for deferring the exception until the prope