One of the recent commits to Scala master removes restriction on combining context/view bounds with implicit parameters. That's a great improvement that reduces amount of boilerplate, but what was the reason of making that restriction before, and what consequences can we expect now?
Context and view bounds add implicit parameters. So if you write:
def f[T : Manifest](l: List[T])(implicit ord: Ordering[T])
There are, in fact, two implicit parameters being passed instead of one. Allowing this kind of syntax will certainly result in some confusion down the road. As implicit parameter usage starts to get more widespread, because of type classes, being able to do something like the above is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With