Tuesday, June 22, 2010

registering callback for multiple senders and a given pattern

today we argued on whether is it useful to have a list of senders as part of system.registerHandler().
It is not clear how useful this feature is to have at level of the language. Seems like a librarish type of feature. For example, exposing  system.addressable is enough and then system.broadcast just becomes a library feature. Similarly, how frequently user would actually want to register a set of senders for a particular pattern. Also, this list has to be static list => how frequently do users know their senders beforehand at the time of registering the callback.

In the bulletin board, user really didn't know the senders beforehand ( until they registered) and so callback was registered when the users were registered i.e. one at a time. Additionally, having an array of patterns might not be a good idea when we anyways plan to have "regex" for patterns.

It is certainly a useful feature and we should, as we write more scripts, evaluate the usefulness of this feature. We might end up incorporating this in emerson.

No comments:

Post a Comment