Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: perltidy IF continuation indentation

by sauoq (Abbot)
on Oct 04, 2005 at 15:40 UTC ( [id://497291]=note: print w/replies, xml ) Need Help??


in reply to Re^2: perltidy IF continuation indentation
in thread perltidy IF continuation indentation

Is anyone else going to use the PBP style?

Not if it makes my code look like that! ;-)

I might be able to live with continuation-indent set to 1 instead of 2 though. As shown below, the perltidy documentation suggests that it should be no greater than that if -i=2.

When default values are not used, it is suggested that the value n given with -ci=n be no more than about one-half of the number of spaces assigned to a full indentation level on the -i=n command.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re^4: perltidy IF continuation indentation
by jaa (Friar) on Oct 05, 2005 at 13:16 UTC

    Yes - I have seen the man page for -i and -ci. Having used the perlstyle guidelines for a few years, we are finding it an adjustment (we miss our cuddled elses!) :) but it does seem to have a certain internal consistency. One thing we do really like is the new cascading trinary operator layout. We used to just use whatever seemed right at the time.

    Which specific part of PBP style don't you like - and for what reason?

    Regards,

    Jeff

      Which specific part of PBP style don't you like - and for what reason?

      I don't own the book (nor do I expect to buy it.) I thumbed through it, and I just don't think it would be very helpful to me. Some of it I agree with and follow anyway, and some of it I just wouldn't. As for style in particular, well, here's my .perltidyrc:

      -ce -nsfs -isbc -olc

      Update: So... I'm curious... are people downvoting this node (currently +0 -3) simply because I refuse to idolize PBP and its illustrious author? Oh well. Sorry, but the more I think about it, the more convinced I become that if you're going to write "best practices" for a whole language, you better be pretty general and leave style issues alone altogether. Which practices are best usually depends on context. I suppose PBP is fine if you are just dropping sheaves of code from the top of your ivory tower though. Besides, a name like Perl Pretty Good Practices In Many Situations wouldn't have been nearly so catchy.

      -sauoq
      "My two cents aren't worth a dime.";
      
        So... I'm curious... are people downvoting this node...simply because I refuse to idolize PBP and its illustrious author?

        Well, I can't speak for anyone else, but I certainly didn't downvote you because you refuse to idolize me or my book. I'm actually rather grateful to you for that.

        I wouldn't have downvoted the node at all, or even commented on it, except for your update, in which--although you freely admit you haven't actually read the book--you still choose to dismiss it with a snide:

        "fine if you are just dropping sheaves of code from the top of your ivory tower"

        I don't consider that informed or constructive criticism, but that alone would still not be sufficient reason to downvote your node.

        The real problem is that ad hominem rhetorical manipulations of that kind are not in the true Perl Monks spirit, and undermine the sense of generosity, honesty, and mutual support that make this community so very special.

        To paraphrase Burke: "All that is necessary for cynicism and negativty to flourish is for good Monks to do nothing." That's why I downvoted your node.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://497291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found