On Tue, Feb 7, 2012 at 2:41 AM, Nadav Samet <[email protected]> wrote:
> I'm not sure I follow, what's evil about callbacks? In particular, I am > working on an RPC library on top of ZeroMQ. It spawns n threads, and > whenever a request arrives it runs a user-supplied function (i.e. callback) > on one of these threads. Are there alternative designs that I should > consider? There's nothing evil about callbacks except when badly implemented, they create code that is unreadable and hard to improve and thus gets buggy. A lot of the more complex examples in the Guide use callbacks, but it's via a cleanly separated event/callback engine (the zloop reactor) that produces IMO simpler, easier to modify and reuse code. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
