Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: (OT) Editor-neutral code formatting

by clemburg (Curate)
on Feb 07, 2002 at 10:44 UTC ( #143845=note: print w/replies, xml ) Need Help??

in reply to (OT) Editor-neutral code formatting

If you really need to think about indenting, your code is too convoluted. Break it into more functions that do less. Otherwise you don't need to think long about it, so it is not important.

Case 1 you present is an example of a piece of code where indenting style really does not matter.

Case 2 you present is not really hard, either, but if you feel that indentation really matters there, you should rewrite it breaking it into more functions.

I often find myself playing around with several ways to indent a particular line of code (in Emacs, so "playing" is the right word), only to notice later that is has vanished because I had to introduce a function to hide the complexity from my bug-introducing typing fingers ...

As for the other side of indenting conventions (ensuring a consistent layout for whatever reason) - only tools will help here, as long as people view an indenting style as part of their personality. (Hint: they should worry about more important things ... )

Christian Lemburg
Brainbench MVP for Perl

  • Comment on Re: (OT) Editor-neutral code formatting

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2021-10-23 06:03 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (87 votes). Check out past polls.