Le 16/10/2011 22:16, Axel Rauschmayer a écrit : >> *From: *David Bruant <[email protected] <mailto:[email protected]>> >> *Subject: **Event properties on objects, a proxy experiment* >> *Date: *October 12, 2011 15:38:02 GMT+02:00 >> *To: *es-discuss <[email protected] <mailto:[email protected]>> >> >> […] >> >> So I wondered "what if events were part of an object and exposed as >> such?". What if an object, instead of being "attributes+methods" was >> "attributes+methods+events"? >> (as I learned later having that thought, what I'm describing is >> actually what some people call "component" in the software >> engineering literature) > > > Great idea! Discoverability is very important. I also like Erik’s > syntactic sugar. > > Thinking of events as methods helps greatly with understanding them. I really think events as something different than methods, no a particular sort of methods. "fire as [[Call]]" is a convenience rather than considering the event as a method.
> There is a rough similarity between overriding (in > subclassing/inheritance) and subscribing to an event. Similar to > method combinations in Common Lisp, it makes sense to define event > listeners that are invoked before the even fires (compare: before > methods) or after an event fires (compare: after methods). > > [1] http://clhs.lisp.se/Body/07_ffb.htm Interesting reading. Thanks for sharing :-) David
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

