You should definitely prefer default parameter value.
- You should never create or use implicit parameters of general types like
Int
orString
. See citation below. - Default value is the simplest solution. In terms of language features complexity.
- Implicit parameters are for some kind of "context" for your method. If there is no context, just default value you can confuse other developers.
- Implicit value search will cost you some amount of compilation time.
- Implicit parameters should be specified manually only in rare cases.
See also: Programming In Scala 21.5 Implicit parameters/A style rule for implicit parameters:
As a style rule, it is best to use a custom named type in the types of implicit parameters.