EDIT 1: I know there are alternatives such as telescoping, this was a purely educational question.
I know that this is true, but why must it be? It seems like with something like this:
public class Foo{
private int bar;
public void SetBar(int baz = ThatOtherClass.GetBaz(3)){
this.bar = baz;
}
}
The compiler could change the method to something like this:
public void SetBar(int baz){
//if baz wasn't passed:
baz = ThatOtherClass.GetBaz(3);
this.bar = baz;
}
Why wouldn't that work, or would it, and it's just a design decision?