Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: [RFC] Review of module code and POD (tab)

by eyepopslikeamosquito (Archbishop)
on Apr 03, 2021 at 23:02 UTC ( [id://11130787]=note: print w/replies, xml ) Need Help??


in reply to Re^4: [RFC] Review of module code and POD (tab)
in thread [RFC] Review of module code and POD

As described nicely in this blog, the pro-TABS camp (including golang) exhort you to use TABs for indentation only, never for alignment:

It's very important to only use spaces for alignment. Never, ever, use tabs for alignment. Tabs may be used for indentation only.
I suspect this important distinction was not widely known in the 1990s, at least I don't remember it being mentioned back then.

Replies are listed 'Best First'.
Re^6: [RFC] Review of module code and POD (tab)
by Your Mother (Archbishop) on Apr 03, 2021 at 23:50 UTC

    I don’t know about programming but even in the 80s—and probably at least the 60s when the Selectric entered the game—tabs in typing and typesetting were format control signifiers without a predefinition; set by document, style declaration, or even a single line. They had no set spacing or even justification. These are all valid tabs and part of why I think tabs have no business in code.

    [one tab]Text… [one tab]Text… [one tab]Longer… [one tab]Text… [one tab]Longer text…
      They had no set spacing or even justification.

      That brings back memories of a school project whereby I typed up quite a bit of text fully justified - using my mother's manual Remington typewriter from the 1930's...IIRC each line was typed out once to work out where the extra spaces would be least noticeable and then typed again justified. Because of the tedium and probably frequency of mistakes, I think I did it a small amount at a time, cut the section out and glued it to a bigger sheet of paper...

        That’s fun. It’s interesting how far we’ve come how fast. It was only two generations ago that editing music recordings, movies, type layout… was done with razors, glue, tape, transparencies, dodging/burning, paint… instead of software. Wild ride we’re on. :P

        In just about all word processors, though it’s been too long since I used WordStar to remember if it was that early, and many typewriters for close to 80 (update: the Selectric is 60 years old, 80 was just me being dumb but who knows? :P) years at this point.

Re^6: [RFC] Review of module code and POD (tab)
by LanX (Saint) on Apr 03, 2021 at 23:43 UTC
    AFAIK does golang have a fixed opinionated formatting everybody must accept and the formatter is built-in.

    In this rigid case you are free to do this, and every body can decide which tab size he wants when reading golang code.

    In our case this would equate to force all code posted on PM thru perltidy with fixed settings.

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-03-29 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found