|
|
|
|
|
by ankurdave
5347 days ago
|
|
You'd use an underscore to form a partially applied function: foo.Sort(x.compare _)
And Scala's getters and setters are essentially equivalent to C#'s properties: class A {
private var _x = 0
def x = _x
def x_=(value: Int) { _x = value }
}
val a = new A
a.x = 5
println(a.x)
|
|
This is not an improvement, it is an unnecessary complication.