Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

Prefer vals when choosing a typeclass instance. #22

Open
hobwekiva opened this issue Jun 28, 2018 · 0 comments
Open

Prefer vals when choosing a typeclass instance. #22

hobwekiva opened this issue Jun 28, 2018 · 0 comments
Labels
good first issue Good for newcomers optimization Code optimization opportunity.

Comments

@hobwekiva
Copy link
Contributor

hobwekiva commented Jun 28, 2018

Currently typeclass resolution just asks for allImplicits and then chooses the first successful one. That could result in inefficient code.

  • prefer vals over defs or complex expressions.
  • prefer vals with the shortest prefix.
  • prefer vals that are local to the method.
@hobwekiva hobwekiva added the optimization Code optimization opportunity. label Jun 29, 2018
@hobwekiva hobwekiva added the good first issue Good for newcomers label Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers optimization Code optimization opportunity.
Projects
None yet
Development

No branches or pull requests

1 participant