I usually get funny looks and stares when I argue this, but in my opinion a good programming language _defines_ style rules. The language spec should say what indent one should use. Don't like it? Tough. Suck it up. The benefits of the entire community using the same style outweigh any individual's annoyance at not being able to use their preferred style. Same goes for something like import sorting. Failing to follow the rules shouldn't result in compiler errors, but definitely compiler warnings, and by the the mere existence of a spec- level official style, all generators and IDEs and such can thus standardize on that. When a new style war breaks out, the language design team should take pains to release an update to the document ASAP, and update the compiler with a minor rev to start emitting warnings when you're using the wrong style.
Although, for certain aspects, such as enforcing exact indenting style for i.e. blocks of code, a smarter compiler / editor can notice that your braces are unmatched, and instead of (as is usual today) giving you a really dumb error message in the wrong location, it can actually look at your indents and figure out with much higher accuracy where you omitted a brace or inserted a superfluous one, basically understanding you 100% correctly and producing only one compiler error that nails the problem 100% (The message would "You missed a brace here", and the position would be in exactly the place where you should be inserting it). On Sep 19, 1:36 am, Josh Berry <[email protected]> wrote: > On Sat, Sep 18, 2010 at 5:58 PM, Miroslav Pokorny < > > [email protected]> wrote: > > On Sun, Sep 19, 2010 at 3:52 AM, Kevin Wright > > <[email protected]>wrote: > > >> I have to agree with this, counting preamble at the top of a file is > >> totally relevant when comparing two implementations of an algorithm. > > > Why would anyone count or care about imports. Most IDEs fold or hide them > > and adding them is almost always a key combo away. Counting this as a major > > feature seems quite desparate, surely theres something more worthwhile or > > impressive than this. > > Amusingly, import order is actually a matter of contention by many of my > coworkers right now. :) So, some folks actually do care. (Essentially, the > "default" order of intellij and eclipse cause constant "conflicts" in source > control.) > > I would liken this with the tabs versus spaces argument, though. In > general, it shouldn't matter at all. -- 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.
