There is one case where it might make sense. I've brought up a
variation of this before, but basically;
Object getMeSome() try {
// Really try
} catch (SpecificFailure e) {
return null;
}
vs.
Object getMeSome() {
try {
// Really try
} catch (SpecificFailure e) {
return null;
}
}
Of course, every optional feature needs good judgement for appropriate
usage, for example the ternary statement vs. if/else.
2011/8/19 Trass3r <[email protected]>:
> Am 19.08.2011, 14:16 Uhr, schrieb Timon Gehr <[email protected]>:
>>
>> I think this makes code harder to read for no obvious benefit.
>> I don't think this is any better than
>>
>> class Foo{
>> private int a_;
>> int a(){return a_;}
>> int a(int a){return a_ = a;}
>> }
>
> +1
>
> Optional braces should be limited to statements.
>