Re: relief -- beauty and symmetry

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Tue Dec 08 1998 - 00:05:48 EST


>
> Well, while I agree with the first one (it's an artifact of the class editor
> Peter and Joerg use), I *love* the hanging else - can't stand those ones on the
> same line. I also hate it when the brackets are missing on an if even when
> there's only one statement (its much clearer to have them).

I'm with you on this one, although I admit I often forget them.
I'm also with you on parentheses around return values.

I don't like coding past the 79th column, though, but it's okay sometimes.

        - Godmar

>
> But I don't care that much ....
>
> Godmar Back wrote:
>
> > >
> > >
> > > It's some relief for me to see that this formatting wasn't really intended:
> > >
> > > ;-)
> > >
> > > public boolean booleanValue()
> > > {
> > > return (value);
> > > }
> > >
> >
> > But, it still perplexes me that some people do not see the beauty
> > of symmetry in an if/else construction:
> >
> > if (x) {
> >
> > } else { // Look at this line, it has all the symmetry of the world in it!
> >
> > }
> >
> > How could you not see how beautifully the else links the else block to
> > the corresponding if? Just the '} else {' part is reminiscent of a
> > monkey wrench that screws the two parts together.
> >
> > Whereas here:
> >
> > if (x) {
> >
> > } // now everybody think this the if's over.
> > else { // so what is that? A dangling else?
> >
> > }
>
>
>
> --
> Tim Wilkinson Tel: +1 510 704 1660
> Transvirtual Technologies, Inc., Fax: +1 510 704 1893
> Berkeley, CA, USA. Email: tim@transvirtual.com
>
>
>
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:07 EDT