user-pic

Jean-Damien Durand

Subscribe to feed Recent Actions from Jean-Damien Durand

  • Brad Gilbert commented on Why code style is important

    I believe this is part of the reason C/C++ programmers put the braces on a new line, to make them stand out. Whereas when you program in Perl, you know the brace is there otherwise it wouldn't compile.

  • gvl commented on Why code style is important

    With postfixed ifs something like this is very unlikely to happen.

  • Gabor Szabo commented on Why code style is important

    I find it funny that this would be warned about just by setting -Wall.


    Our Wall would not accept such code.

  • Ovid commented on Why code style is important

    And this is why, when I'm hacking on Javascript, I always put the curly braces on if statements, even if the body is only a single line.

  • Ether commented on Why code style is important

    This looks like something that could have happened from a git merge, without someone manually reviewing the result of the merge.

    The same thing would have happened if braces were used like this:

    if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
    { goto fail; }
    { goto fail; }

    Only if the braces were on a different line would we either have gotten a
    detectable merge conflict, or a second goto operation that did no harm:

    if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) {
    goto fail;

Subscribe to feed Responses to Comments from Jean-Damien Durand

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.