http://www.perlmonks.org?node_id=734435


in reply to Re^8: IO::Lambda: call for participation
in thread IO::Lambda: call for participation

How about "conditions" instead of "predicates"? Also, at the expense of changing your API, it might be clearer if the functions names themselves were less like perl functions and more intuitively descriptive.

My thought is that since these aren't actually executed immediately, it would be better to have names that describe the activating condition rather than names that sound like an imperative.

For documentation, I'd strongly suggest separating the perl signature from the context arguments. E.g.

read($callback) -- context stack: $filehandle, $deadline = undef

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.