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

Static methods vs. instance methods #148

Open
vforvova opened this issue Feb 2, 2017 · 2 comments
Open

Static methods vs. instance methods #148

vforvova opened this issue Feb 2, 2017 · 2 comments

Comments

@vforvova
Copy link

vforvova commented Feb 2, 2017

Hi! Please explain why things have been done this way: in one hand we have Future with method fork for instance, in other we have Either with static method either?
It would be more comfortable to use them in the same way. Would it be better to have both an instance and static methods for them?

@CrossEye
Copy link
Member

CrossEye commented Feb 3, 2017

Anyone with a good answer to this? @asaf-romano? @buzzdecafe? @davidchambers? @scott-christopher? @TheLudd? Beuller?

@scott-christopher
Copy link
Member

My take on this is if the method is unique to the instance (such as fork in the case of Future), or a fantasy-land method then they'll end up attached to the instance. If the function can be created external to the instance it will exist as a static function. I'm sure there have been some arbitrary choices made over time and it would be good to get them all cleaned up and consistent.

I'd personally be happy for the library to provide both static and instance methods where possible and would welcome a PR (assuming no concerns are raised from the others).

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

3 participants