Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I must be the only person in the world who thinks it is absurd to see code formatting as a matter of personal preference.


        I just ( you know , like this )
    format my English text in any old way,it
        gets awfully hard to read.There are standard grammatical conventions for written text,yet we try to reinvent them for programming
    . See how silly it is to break before the operator
    ?And what's the deal with braces being non-tight
    ? ( I mean, we don't have space after an opening paren ( and
    • The problem is that while the big decisions are obvious, the little ones are not. And there are lots of little decisions to make while formatting. While you can get people to agree on some of them, you can't get them to agree on all of them.

      For example, based on your post you should not break before operators. However if you read Perl Best Practices, you'll find some excellent reasons given for why you should break before operators. Basically they have to do with how our eyes move when we skim through c
      • ...coding expertise is fragile. ... Suppose we take someone who is familiar with a particular formatting style. ... Well it turns out that the transition is a shock.

        Exactly. Like I said: babel. The conflict comes from the subtle differences.

        And that is what really drives these religious debates. ...

        I would rather than the debate be based in reason than religion (call it semantics, but "religious debate" is, by definition, a contradiction of terms.)

        Given one internally consistent system, which i

        • I would rather than the debate be based in reason than religion (call it semantics, but "religious debate" is, by definition, a contradiction of terms.)

          Actually it is not a contradiction of terms. It is a description.

          Debates happen. Both sides bring arguments to bear, and argue. But people wind up arguing past each other, and after a while it becomes apparent that the answers are hugely important to people, but they cannot logically justify that importance.

          Because this is so reminiscent of debates over religion, we call debates with these characteristics, "religious debates". (With the subtext being that the One True Brace Style a matter of theology.)

          Given one internally consistent system, which is logically defensible, we would not be having this discussion and perltidy would not have options.

          Oh how I wish you were right.

          Unfortunately, if perltidy only offered one option, it would be ignored by all of the people who don't agree with that one option. It is only able to become popular because it is flexible.

          And, truth be told, there is no one option that is right. For instance I already pointed out that there are good reasons to break lines before operators. However you can't do that in many languages (eg JavaScript, VB and Ruby), because they rush to end your line of code when you do that. So the ideal Perl style won't work in those languages.

          The result? We're not about to see agreement on how to format code in our lifetimes.