I agree with that, it's unnecessary unless when nesting and subject to the danging-else trap. I just wish this was more consistent in the compiler, i.e. reflection and I/O code could be made to take only 50% of the space if try-catch-finally would honor the same single- statement rule as elsewhere. I believe there was actually a proposal for such in project Coin.
/Casper On 9 Sep., 17:28, Jess Holle <[email protected]> wrote: > I think you meant to reply to something else as I never mentioned braces. > > Moreover I really, really dislike having braces around single line if, > else, for, etc, blocks -- and never do in my code. I agree, that an IDE > and reasonable indentation should show the error in your ways -- rather > than pre-emptive clutter with unnecessary braces. > > [Of course I add extra braces where I want to explicitly limit the scope > of variables, but that's different :-)] > > Reinier Zwitserloot wrote: > > If you're scared of creating bugs due to a lack of braces (e.g. you > > add a line and the code is not properly indented), you're doing it > > very very wrong. That should not be a worry in a proper development > > environment. > > > auto-format is your friend. > > > --Reinier "I have loads and loads of single statement unbraced if/ > > elses, and it's NEVER EVER caused a problem" Zwitserloot > > > NB: Unless you've tried it, I don't want to hear about whines. > > > On Sep 9, 1:55 pm, Jess Holle <[email protected]> wrote: > > >> Casper Bang wrote: > > >>>> I'm not sure what you mean. There are no annotations in JavaFX > > >>> Sorry, from an earlier entry I inferred that there were > > >>>> It's enough to drive one absolutely batty. > > >>> So is JDBC's index-by-1 nature in bind variables. > > >> Agreed! Everything else in Java is index-by-0, why should the JDBC API > >> be different? > > >> That said, most everyone has experienced index-by-1 and can deal with > >> that in a system integration API like JDBC. The many hoops one has to > >> jump through just to do a logical "setDouble(NaN)" or to set a null are > >> amazing -- and all undocumented at a JDBC level except for the need for > >> the 2 and 3 argument versions of setNull(), which just seem silly (null > >> is null -- no data type or type name needed). > > >> -- > >> Jess Holle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
