In Scala 2 we can currently do this:
scala> :type scala.math.pow (Double, Double) => Double scala> val square = scala.math.pow(_, 2) val square: Double => Double = Lambda$8219/1817381934@30eec548 scala> square(3) val res14: Double = 9.0
Is the above example going to be affected by the Scala 3 changes to eta expansion? https://dotty.epfl.ch/docs/reference/changed-features/eta-expansion.html. i.e. in Scala 3, will we be able to achieve the same without using an underscore?
I am thinking that the answer is no, that we will continue to have to use the underscore, because the following attempt to do away with the underscore doesn’t seem to work:
scala> val square: Double => Double = scala.math.pow(2) 1 |val square: Double => Double = scala.math.pow(2) | ^^^^^^^^^^^^^^^^^ |missing argument for parameter y of method pow: (x: Double, y: Double): Double
Would I be right in thinking that?