I understand why it is useful to do
private[this] val xx = 3
as explained on https://github.com/databricks/scala-style-guide#privatethis.
Does the same apply to lazy val
as well?
Q1. Is
private[this] lazy val xx = 3
faster than
private val xx = 3
?
Q2. def f(i: Int) = i
Is private[this] lazy val xx = f(3)
faster than
private val xx = f(3)
?