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

naming: success/failure vs success/error #80

Closed
Andrei-Pozolotin opened this issue May 20, 2019 · 1 comment
Closed

naming: success/failure vs success/error #80

Andrei-Pozolotin opened this issue May 20, 2019 · 1 comment

Comments

@Andrei-Pozolotin
Copy link

  1. it seems that success/failure:
    effect.on(
        success=lambda value: print("I like {} too!".format(value)),
        failure=lambda error: print("sorry, there was an error. {}".format(error))
    )
  1. reads better then success/error:
    effect.on(
        success=lambda result: print("I like {} too!".format(result)),
        error=lambda e: print("sorry, there was an error. {}".format(e))
    )

😄

@radix
Copy link
Contributor

radix commented May 21, 2019

Hi @Andrei-Pozolotin! I appreciate that you want to improve Effect, but I don't think that "failure" is so much better than "error" that it is worth complicating the API by either making a backwards-incompatible change, or by supporting multiple keywords to mean the same thing.

Thank you for filing a ticket with your suggestion, though!

@radix radix closed this as completed May 21, 2019
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

No branches or pull requests

2 participants