> (like, say, the way Jeremy Martin proposed)

FTR, I haven't proposed anything just yet :)

Although if I did, I think I would be more fond of something like:

Object.mixin({ foo: 'bar' }, EventEmitter);

... that is, I can see the value of events as an object-level API that
doesn't imply actual inheritance from something else.  The use of `mixin`
is probably a distraction here, but the main point is that it's opt-in.
 Events inherently have semantics around them, and they're certainly not
universal semantics for objects.  In fact, event semantics aren't even
universal for events (e.g., bubbling).  It seems better to me to have some
sort of explicit contract before those semantics kick in.

On Wed, Jul 10, 2013 at 2:31 PM, David Bruant <bruan...@gmail.com> wrote:

> Le 10/07/2013 20:27, Anne van Kesteren a écrit :
>
>  On Wed, Jul 10, 2013 at 2:19 PM, David Bruant <bruan...@gmail.com> wrote:
>>
>>> This madness really has to stop. We need first class events (and I'm
>>> praying
>>> for a way to retrofit them into the DOM if possible)
>>>
>> If you don't do the latter, I wonder how you'll achieve the former.
>>
> The former can be achieved independently of anything else. It only
> requires for the ECMA 262 spec to say "now, objects have events!" (like,
> say, the way Jeremy Martin proposed).
> Whether that event system works well and intelligently with the current
> event systems (DOM especially since it has lots of quirks) is a different
> matter.
>
> But I agree it would be wise to do both at the same time.
>
> David
>



-- 
Jeremy Martin
661.312.3853
http://devsmash.com
@jmar777
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to