On 10/14/07, Lucian Adrian Grijincu <[EMAIL PROTECTED]> wrote:
> On 10/14/07, William A. Rowe, Jr. <[EMAIL PROTECTED]> wrote:
> > Lucian Adrian Grijincu wrote:
> > > Just removing some unused code.
> > > APR_SUCCESS is deemed to be zero as I understand it, so no use in
> > > checking for it explicitly.
> >
> > Untrue, because it makes things clearer to the reader.
> >
>

and I find things like:
    x = smth();
    x = smth_else();
    use(x);

more confusing than
    smth();
    x = smth_else();
    use(x);

Even though then compiler might optimize away the first attribution.


> isn't this why they invented comments?
>
> why do:
>
>    if(x==0)
>      return 0;
>    return x;
>
> when you can do:
>    return x; //and place a witty comment here?
>
> saves a cmp and a jump.
>
> > The compiler can't care less if you compare (rv == 0) or (!rv),
> > it optimizes it the same way.
> >
>
> What !rv? i don't wanna do the comparison at all.
>

--
Lucian

Reply via email to