Skip to content

added mapCommand, unmapCommand APIs#4

Open
jusopi wants to merge 1 commit intocreynders:masterfrom
jusopi:master
Open

added mapCommand, unmapCommand APIs#4
jusopi wants to merge 1 commit intocreynders:masterfrom
jusopi:master

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" notifications@github.com 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