Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^7: How would you indent this?

by GrandFather (Saint)
on Mar 18, 2021 at 21:13 UTC ( [id://11129921]=note: print w/replies, xml ) Need Help??


in reply to Re^6: How would you indent this?
in thread How would you indent this?

I agree that the "editor shouldn't interfere automatically". One of the worst editors I ever worked with was the UCSD Pascal system which forced its own idea of indentation live while editing, including disallowing multi-line comments. I run perltidy occasionally to clean up after things like a big code refactor, and I pretty much always use it to clean up code from PerlMonks questions.

The impressive thing about perltidy is that I have tuned it to produce almost exactly what I write most of the time. Some of the modern C++ pretty printer type tools are pretty good too. Modern Visual Studio can do a pretty good job and the C++ Code Style Formatter provided by Eclipse is very configurable aside from some weird omissions (why does it insist on a space before a : in a constructor declerator list?). So yes, pretty printing tools can get extremely close to making the same code style decisions I do, partly because I have thought hard about my style choices and understand what I want to achieve, so results are consistent and fairly easy to codify.

I apologize for the perceived attack on emacs. Never fear, I treat vi equally. :-D

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^8: How would you indent this?
by LanX (Saint) on Mar 18, 2021 at 21:22 UTC
    Perl::Tidy is an awesome tool. Unfortunately configuring it not so much.

    > I apologize for the perceived attack on emacs. Never fear, I treat vi equally. :-D

    Cheap attacks are cheap to get. That's the economics of FUD.

    Actually I like Komodo, it has indeed one feature I want to port back to emacs.

    Sadly it might not survive the next 5 years after Mozilla ended XUL and Activestate saw the need to Open Source it.

    Good luck!

    PS: No worries, I treat Pythonistas equally! :-D

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Actually I like Komodo ... Sadly it might not survive the next 5 years

      I may not care in five years, but assuming I do it isn't likely to suddenly stop working the day ActiveState stop actively supporting it.

      PS: I know some fine people who prefer Python - I don't hold that against them (much). I know some fine people who use PHP - I try manfully not to hold that against them.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
        > PS: I know some fine people who prefer Python - I don't hold that against them (much). I know some fine people who use PHP - I try manfully not to hold that against them.

        Neither do I, I like both Python and vim.

        It's the community which has nasty habits.°

        And there is usually a direct correlation between their own skills on the tool and the desire of badmouthing others.*

        Like I know a guy who can barely write a page of Python but keeps telling everyone that Perl is only a bunch of Regex.

        I'm an outspoken Anti-FUD activist, stoicism won't stop this.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        °) I don't like PHP tho, but I don't hold it against it's users.

        *) It's human, we all want to belong to a tribe and the more insecure we are, the bigger the desire to be better than the neighboring tribe.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-23 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found