[asterisk-dev] Coding guidelines change (proposed)
Donny Kavanagh
donnyk at gmail.com
Tue Feb 26 15:19:15 CST 2008
I agree with russ and some others, we should make that the policy for all
new submitted code, but i dont think we should go back and modify every
single if statement without brackets, that would be a nightmare. And the
possibility of introducing bugs would be large.
On Tue, Feb 26, 2008 at 3:40 PM, Russell Bryant <russell at digium.com> wrote:
> Sergey Tamkovich wrote:
> > Tilghman Lesher ?????:
> >> I'd like to propose a change to the coding guidelines, and I'm airing
> it here
> >> for specific feedback before we make this change. Currently, our
> standard
> >> is that if you have a single statement following an if/for/while
> construct,
> >> then we do not require parentheses around the single statement. While
> this
> >> is legal C, it has caused a number of issues in the past, where another
> >> statement was added at that indentation level, but without adding the
> >> necessary braces.
> >>
> >> I'd like to change the coding guidelines that the braces are no longer
> >> optional; that they are mandatory,
> > +1
>
> +1 ... sort of. I'd rather it just be "encouraged".
>
> >> and if this change is approved, a janitor
> >> project will be posted shortly to convert legacy code to the new
> standard.
> >>
> > -1
> >
> > Too complex task, a lot of small changes - the great chance to add a new
> > bugs. I think we shouldn't change existing (working) code intentionally.
> > We should convert legacy code "as we go" - with other changes
>
> Make that -2. I think it's a bunch of pointless small changes. I don't
> mind
> encouraging them in the future, but going back and changing the existing
> code is
> pointless IMO.
>
> --
> Russell Bryant
> Senior Software Engineer
> Open Source Team Lead
> Digium, Inc.
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20080226/ba819423/attachment-0001.htm
More information about the asterisk-dev
mailing list