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

Arguments ordering for kill functions #118

Closed
natefaubion opened this issue Aug 26, 2017 · 3 comments
Closed

Arguments ordering for kill functions #118

natefaubion opened this issue Aug 26, 2017 · 3 comments

Comments

@natefaubion
Copy link
Collaborator

  • killFiber :: Error -> Fiber eff a -> Aff eff Unit
  • killVar :: AVar a -> Error -> Aff (avar :: AVAR | eff) Unit

Should the error come first or second?

@jdegoes
Copy link
Contributor

jdegoes commented Aug 26, 2017

I believe the error should always come first, as this allows you to create constructors for different families of errors. Whereas I can't see any use for fixing the action but varying the error.

@natefaubion
Copy link
Collaborator Author

I agree, which is why I made killFiber what it is. But all the AVar actions have the AVar first :/. Personally I really hate AVar first, but all the Ref APIs use this order as well 😞

@natefaubion
Copy link
Collaborator Author

Closed via #119

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

No branches or pull requests

2 participants