Le 12/10/2011 16:42, John J Barton a écrit :
Rather than properties, how about modeling events with promises or await?
Could you describe what you mean and add some code of how it would look like?

One of the problems I want to solve is to have events as first-class constructs of objects in order to be able to list/document them easily, to be able to "statically" analyse a publish/subscribe mecanism from source code. The link that Allen just sent is great for that regard. The "public event ChangedEventHandler Changed;" declaration is great. There is no such thing in JavaScript, but the analysis of the property descriptor would be an equivalent.

If events are modeled with promises and awaits and solve the problem I described, it sounds like an interesting idea.

David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to