- Reaction score
- 1,667
It may apply to any languages that create classes.
I'm just curious on what code format do people prefer.
Code:
class Foo{
int bar;
Foo(int a){
bar = a;
}
getFoo_1(){
return this;
}
getFoo_2(){
return new Foo(bar);
}
getFoo_3(){
Foo f = this;
//Debugging purposes...
return f;
}
getFoo_4(){
Foo f = new Foo(bar);
//Debugging purposes...
return f;
}
}
I'm just curious on what code format do people prefer.