These are chat archives for typelevel/scala

8th
Dec 2016
som-snytt
@som-snytt
Dec 08 2016 21:03
Nobody told me that LBS already has multiple implicit parameter sections:
scala> class C(private implicit val i: Int)(implicit s: String) { def f = implicitly[String] + implicitly[Int] }
defined class C

scala> { implicit val x = 42 ; implicit val s = "hi" ; (new C).f }
res6: String = hi42
Rob Norris
@tpolecat
Dec 08 2016 21:04
wait what
Merlin Göttlinger
@mgttlinger
Dec 08 2016 21:09
@tpolecat I know that moment when you realise something you have discovered by accident is possible. Today I wrot a implicit sealed abstract case class and thought the same thing...
Rob Norris
@tpolecat
Dec 08 2016 21:10
private implicit sealed abstract case class would be 6 keywords in a row. Can we do better?
Merlin Göttlinger
@mgttlinger
Dec 08 2016 21:10
private[this]?
Hamish Dickson
@hamishdickson
Dec 08 2016 21:10
I think that’s because you declaring the first block with a val - I’ve seen Jason mention something about this before
Rob Norris
@tpolecat
Dec 08 2016 21:10
i guess that counts, sure
Hamish Dickson
@hamishdickson
Dec 08 2016 21:14
actually I think I’m talking nonsense
som-snytt
@som-snytt
Dec 08 2016 21:18
I was fixing the shortest crasher https://issues.scala-lang.org/browse/SI-8704 because my office cubicle was moved and I can't get on the network, so that was the next best thing to real work. I had mentioned the ambiguity that "first param is implicit" means "implicit section", but LBS said it was too finnicky to nuance it. But I only just realized this consequence.
It also answers the puzzler, What's the only modifier you can repeat? class C(implicit implicit val x: Int) sort of.
Rob Norris
@tpolecat
Dec 08 2016 21:20
What do you actually do for work? I realize you wish to remain mysterious so feel free to not answer.
som-snytt
@som-snytt
Dec 08 2016 21:21
Backend stuff at sonicwall.com.
Nothing out of this world like you.
Rob Norris
@tpolecat
Dec 08 2016 21:24
Do you sell a Cone of Silence? I have always wanted one.
The one from Get Smart, to be clear. I just learned there was one in Dune too.
som-snytt
@som-snytt
Dec 08 2016 21:26
I don't remember from Dune, but knew what you meant. What a boon in open workspaces.