Moshe Zadka" wrote: > > object.denotify(message[, callback]) - Turn off notification. >=20 > You need to be a bit more careful here. What if callback is > foo().function? It's unique, so I could never denotify it. if you need a value later, the usual approach is to bind it to a name. works in all other situations, so why not use it here? > A better way, and more popular (at least in the signal/slot = terminology), > is to return a cookie on connect, and have disconnect requests by a = cookie. in which way is "harder to use in all common cases" better? ... as for the "break" functionality, I'm not sure it really belongs in a basic observer class (in GOF terms, that's a "chain of responsibility"). but if it does, I sure prefer an exception over a magic return value. </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4