Hello,
I use docopt and this lib a lot, but I have problems with dispatching mechanism by order. I am forced to reorder my functions every time because I have commands like these:
I know I can reorder them to be working, but it's kind of trap. Because I always forget about this "feature" and I am debugging why my code is doing something else. And it's not easy task to find the reason :(
IMHO better approach would be to match on best match - function that matches the greatest number of arguments. This way everybody can order functions the way he likes :) What do you think?
Hello, I use docopt and this lib a lot, but I have problems with dispatching mechanism by order. I am forced to reorder my functions every time because I have commands like these:
I know I can reorder them to be working, but it's kind of trap. Because I always forget about this "feature" and I am debugging why my code is doing something else. And it's not easy task to find the reason :(
IMHO better approach would be to match on best match - function that matches the greatest number of arguments. This way everybody can order functions the way he likes :) What do you think?