Skip to content

Commit 2516ff8

Browse files
committed
Remove 'view bounds' from the FAQ
As they're deprecated (scala/scala#2909). Most of that section describes the common alternative to view bounds, though, so that probably deserves to remain in the FAQ
1 parent dffac97 commit 2516ff8

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tutorials/FAQ/finding-implicits.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ method declaration:
7070

7171
def foo[T](t: T)(implicit integral: Integral[T]) {println(integral)}
7272

73-
### View Bounds
73+
### Implicit conversions as implicit parameters
7474

7575
There's one situation where an implicit is both an implicit conversion and an
7676
implicit parameter. For example:
@@ -86,14 +86,6 @@ conversion available from its class to `Seq[T]`. Because of that, I can pass a
8686
Behind the scenes, the compile changes `seq.IndexOf(value)` to
8787
`conv(seq).indexOf(value)`.
8888

89-
This is so useful that there is a syntactic sugar to write them. Using this
90-
syntactic sugar, `getIndex` can be defined like this:
91-
92-
def getIndex[T, CC <% Seq[T]](seq: CC, value: T) = seq.indexOf(value)
93-
94-
This syntactic sugar is described as a _view bound_, akin to an _upper bound_
95-
(`CC <: Seq[Int]`) or a _lower bound_ (`T >: Null`).
96-
9789
### Context Bounds
9890

9991
Another common pattern in implicit parameters is the _type class pattern_. This

0 commit comments

Comments
 (0)