I need something like this:
class MyClass(a: String = "", b: String = "") {
def a = this.a
def b = if(this.b.isEmpty) this.a else this.b
}
can I reuse names of the constructor arguments some way? I need this because I want to use named arguments in constructor calls and still customize the output of the same-named properties.
Use other names in the primary constructor and the names you want in an auxiliary one: