Diego Biurrun | 1 Mar 2009 14:10
Picon
Gravatar

Re: [PATCH] ao_dart

On Sun, Mar 01, 2009 at 09:59:30PM +0900, KO Myung-Hun wrote:
> 
> Diego Biurrun wrote:
> >> But, now the closing bracket '}' of last case is placed on the same
> >> depth with the closing bracket '}' of switch. I think it's not good
> >> style.
> >
> > Just look at what K&R really does: Indent the opening brace after 'case'.
> 
> How do I that in this case ?
> 
>     case 1234:
>         {
>         if (true) {
>         }
>         break;
>         }
> 
> Just do that ?

Fine with me.

Diego
Reimar Döffinger | 1 Mar 2009 14:13
Picon
Picon

Re: [PATCH] ao_dart

On Sun, Mar 01, 2009 at 02:10:58PM +0100, Diego Biurrun wrote:
> On Sun, Mar 01, 2009 at 09:59:30PM +0900, KO Myung-Hun wrote:
> > 
> > Diego Biurrun wrote:
> > >> But, now the closing bracket '}' of last case is placed on the same
> > >> depth with the closing bracket '}' of switch. I think it's not good
> > >> style.
> > >
> > > Just look at what K&R really does: Indent the opening brace after 'case'.
> > 
> > How do I that in this case ?
> > 
> >     case 1234:
> >         {
> >         if (true) {
> >         }
> >         break;
> >         }
> > 
> > Just do that ?
> 
> Fine with me.

And that's supposed to be not ugly?
Michael Niedermayer | 1 Mar 2009 18:33
Picon
Picon

Re: [PATCH] ao_dart

On Sun, Mar 01, 2009 at 02:13:38PM +0100, Reimar Döffinger wrote:
> On Sun, Mar 01, 2009 at 02:10:58PM +0100, Diego Biurrun wrote:
> > On Sun, Mar 01, 2009 at 09:59:30PM +0900, KO Myung-Hun wrote:
> > > 
> > > Diego Biurrun wrote:
> > > >> But, now the closing bracket '}' of last case is placed on the same
> > > >> depth with the closing bracket '}' of switch. I think it's not good
> > > >> style.
> > > >
> > > > Just look at what K&R really does: Indent the opening brace after 'case'.
> > > 
> > > How do I that in this case ?
> > > 
> > >     case 1234:
> > >         {
> > >         if (true) {
> > >         }
> > >         break;
> > >         }
> > > 
> > > Just do that ?
> > 
> > Fine with me.
> 
> And that's supposed to be not ugly?

Its supposed to be asshatry.

Like ive said in the past, following K&R style in a way that is 5 magnitudes
more strict than K&R themselfs ever suggested is plain idiotic. AFIAK they
(Continue reading)

Diego Biurrun | 1 Mar 2009 14:21
Picon
Gravatar

Re: [PATCH] ao_dart

On Sun, Mar 01, 2009 at 02:13:38PM +0100, Reimar Döffinger wrote:
> On Sun, Mar 01, 2009 at 02:10:58PM +0100, Diego Biurrun wrote:
> > On Sun, Mar 01, 2009 at 09:59:30PM +0900, KO Myung-Hun wrote:
> > > 
> > > Diego Biurrun wrote:
> > > >> But, now the closing bracket '}' of last case is placed on the same
> > > >> depth with the closing bracket '}' of switch. I think it's not good
> > > >> style.
> > > >
> > > > Just look at what K&R really does: Indent the opening brace after 'case'.
> > > 
> > > How do I that in this case ?
> > > 
> > >     case 1234:
> > >         {
> > >         if (true) {
> > >         }
> > >         break;
> > >         }
> > > 
> > > Just do that ?
> > 
> > Fine with me.
> 
> And that's supposed to be not ugly?

K&R as executed by the 'indent' program places the if at the next
indentation depth.  I don't particularly care.

Diego
(Continue reading)


Gmane