[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Why is C so popular?



Steve Lamb wrote:
>     That's just it, I don't like C indenting any more, period.  It isn't
> "someone else's style" that is the problem, it is the fact that it is the
> antithesis of how I've grown to like to code.  Lemme put it this way:
> 
> C:
> if foo
>     bar;

That's bad style unless you have a reason to know for sure that you will
only ever need exactly one statement in the if. Since there's no benefit
to leaving out the braces and you'd have to think hard every time you
did, it's better to just avoid this C misfeature entirely..

>     It boils down to this.  In Python if I want something to be in a block, I
> smack tab and don't even need to worry about my editor doing the right thing. 

Then you just hit open brace, and let the editor worry about doing the right
thing.

-- 
see shy jo

Attachment: pgp4WgFmOOx5t.pgp
Description: PGP signature


Reply to: