Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added mapCommand, unmapCommand APIs #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added mapCommand, unmapCommand APIs #4

wants to merge 1 commit into from

Conversation

jusopi
Copy link

@jusopi jusopi commented May 7, 2014

I thought this would be a good contribution to the API in that it adds functionality much like RobotLeg's command, event bus paradigm.

@creynders
Copy link
Owner

Thanks for the PR, but to be honest I'm not entirely sure whether this is useful... Personally I just map command functions as handlers and do not see the benefit of making them constructable, but YMMV. Do you know of any added benefits to making "classes" with execute functions instead of using plain functions?

@jusopi
Copy link
Author

jusopi commented May 12, 2014

I think the encapsulation of the execute, result and error handlers within
a "class" or module is beneficial. Otherwise you're having to have
awareness of those handlers elsewhere.

Of course this is a moot point if you are just nesting anonymous functions,
something I generally try to avoid.
On May 11, 2014 9:52 AM, "creynders" [email protected] wrote:

Thanks for the PR, but to be honest I'm not entirely sure whether this is
useful... Personally I just map command functions as handlers and do not
see the benefit of making them constructable, but YMMV. Do you know of any
added benefits to making "classes" with execute functions instead of using
plain functions?


Reply to this email directly or view it on GitHubhttps://github.com//pull/4#issuecomment-42771071
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants