I always make it apparent which braces go with which.

By 5 Unknown Entity on February 07, 2008

example:
public void run()
{
     //code;
}
or...
catch(Exception e) {          /*do something*/           }

but NEVER
public void run() {
      //code;
}

not pretty, ugly and hard to read. I am annoyed when I see it.

Embed Claim Make a related claim

Discussion (14)

http://alkanshel.myopenid.com/

4 Alkanshel who disagreed, says

Fewer lines = sexier.
Besides, I can read it just bloody fine. I mean, yeah, when I'm coding for other people, perhaps...

Make a related claim 9 months ago (link)
http://www.tapsellferrier.co.uk/nicferrier/

8 nic who disagreed, says

The reason I use the bsd style is preciesely because it is more standard. It is standard Java coding style, it is standard Apache project coding style, it's standard BSD coding style (obviously). All in all I reckon more people use that style than another.

Make a related claim 9 months ago (link)
http://rorek.org/

8 Rorek who disagreed, says

Indentation makes it just as clear IMO.

Make a related claim 9 months ago (link)
http://www.tapsellferrier.co.uk/nicferrier/

8 nic who disagreed, says

GNU do it the way they do it because it's easier to parse. And it is.

I like the GNU style a lot... but almost no one uses it outside of GNU.

Make a related claim 9 months ago (link)
http://eratosthenes.myopenid.com/

5 Unknown Entity who disagreed, says

@Nic:

your right about java. the source is all coded like that. I still think it's less easy to read.

Make a related claim 9 months ago (link)
http://eratosthenes.myopenid.com/

5 Unknown Entity who disagreed, says

Not to say your wrong about the other things, just that I've only checked java.

Make a related claim 9 months ago (link)
http://www.tapsellferrier.co.uk/nicferrier/

8 nic who disagreed, says

Java style is defined by Sun and they've always used K&R/BSD brace style.

Make a related claim 9 months ago (link)
http://marphod.livejournal.com/

3 Marphod who agreed, says

Well, I wish I did. I did until this job.

Make a related claim 9 months ago (link)
http://jeanhuguesrobert.myopenid.com/

1 Jean Hugues Robert who agreed, says

Most braces are useless, blame C for that.

I do this:


if( expr ){
do_this;
}else{
do_that;
}

But I wish I could do this:


if expr
do_this
else
do_that
end

Make a related claim 9 months ago (link)
http://darch.myopenid.com/

6 D'Archangel who agreed, says

Well, your C makes my eyes cross because of the bad use of spaces, and your wishful thinking example is only parseable if white space is significant.

D'A

Make a related claim 9 months ago (link)
http://darch.myopenid.com/

6 D'Archangel who agreed, says

On the subject of a claim: Not necessarily apparent to Protagoras, but there exist better uses of my time.

D'A

Make a related claim 9 months ago (link)
https://me.yahoo.com/a/oYCIS9IPrNclzga2S1Jc3sng.pMm

1 Jon Peck who disagreed, says

I'm gonna go out on a limb here and say: moderate nonalignment of brackets is OK, given that everybody involved has a decent syntax highlighter.

Make a related claim 7 months ago (link)
http://eratosthenes.myopenid.com/

5 Unknown Entity who disagreed, says

disagreeing because I got lazy

"most of the time" is still true.

Make a related claim 4 months ago (link)
http://vynce.myopenid.com/

8 Vynce who disagreed, says

I generally make it apparent to me. I don't use the style indicated in the description.

Make a related claim 4 months ago (link)
Sign in in to leave a comment.