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

customAction overload is redundant #45

Open
stewSquared opened this issue Jun 1, 2017 · 1 comment
Open

customAction overload is redundant #45

stewSquared opened this issue Jun 1, 2017 · 1 comment

Comments

@stewSquared
Copy link
Contributor

stewSquared commented Jun 1, 2017

In the Dal trait, customAction is overloaded:

def customAction[R](action: => Future[R]): T[R]

and

def customAction[R](action: => OptionT[Future, R]): OptionT[T, R]

The latter is unnecessary, since you can just optionT.mapT(customAction). It's also detrimental because overloading interferes with type inference and cognitive load. I strongly encourage removing it or at the very least re-naming to something more semantically explicit.

@stewSquared
Copy link
Contributor Author

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

1 participant