An implicit equality typeclass instance, 2015: implicit val intEqual: Eq[Int] = new Eq[Int] { def equal(x: Int, y: Int): Boolean = x == y } (1/8)
-
-
My favorite is the "forgotten experiment." It says what you mean; it declares a witness to `Eq Int`, with a name. That means it can be used both directly as an object (by name), and by inference to satisfy constraints. Seems ideal.
-
Around that time
@odersky was considering about five different keywords to replace "implicit". I joked at the time that if we started calling them "witnesses", to work around the other changes to implicit scopes, we'd need a "witness relocation program"... - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.