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

Re: (OT) Editor-neutral code formatting

by clemburg (Curate)
on Feb 07, 2002 at 10:44 UTC ( [id://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
http://www.brainbench.com

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found