Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

(tye)Re2: My day with Damian Conway

by tye (Cardinal)
on Jul 02, 2001 at 19:11 UTC ( #93199=note: print w/ replies, xml ) Need Help??


in reply to Re: (tye)Re: My day with Damian Conway
in thread My day with Damian Conway

By default, if it has to dwim, it should dwim assuming that hard tabs are 8 spaces wide. This should not generally pose a problem, since most of the time the tabbing will be consistent throughout anyway, and no dwimming will be necessary. This puts the onus on people using nonstandard tabs to make sure they're consistent so that Perl doesn't have to guess.

Larry seems to be making a few assumptions that I find invalid. First, that "tabs are 8 spaces" is the most common setup. I actually find (to my amazement and disdain) that "tabs are 4 spaces" is the most common situation with lots of other variants flying about.

Second, that people aren't illogically, passionately opposed to moving to that standard when given a push. I find that some people are just that. Part of the problem is that some editing tools don't make it easy to indent your code "4 spaces at a time" unless you also have tabs set at 4 spaces each so forcing people to move to 8 spaces per tab also makes editing their code more difficult.

Third, that normal editing activities usually leave the "tabbedness" of lines similar. I work at a company where the policy is that tabs be converted to spaces before you check in your code so that we don't have to agree on how many spaces are in a tab (because we tried to agree and it was hopeless). I've seen how most of the developers edit code and it is trivial to set their environment so that tabs get turned to spaces. However, my editor shows me tabs and I can say that the tabbedness of related lines if very often not similar even though the lines look similarly indented to the people working on them. So if company policy in a small company can't make that happen, I have no hope for Perl 6 policy making that happen in the huge Perl community.

For example, most editors auto-indent lines in at least some situations. My editor defaults to using tabs for that but doesn't (by default) convert typed spaces to tabs. Other editors at work default to using spaces for auto-indent and don't convert typed tabs.

So I consider that use tabstop will be a required feature but the change will still result in a spate of confusion and adjustment. Don't get me wrong, the change is probably worth all of that, but it is a shame to not see better forethought on the matter.

        - tye (but my friends call me "Tye")


Comment on (tye)Re2: My day with Damian Conway
Re: (tye)Re2: My day with Damian Conway
by stefp (Vicar) on Aug 28, 2001 at 15:29 UTC
    I agree with you, tye
    tab is a key which behavior apes a mechanical device. It should generate the appropriate number of spaces. It should not have been a character in the first place because its interpretation vary with editors. Consideration of disk space or bandwidth are more and more irrelevant partly due to the existence of good compression schemes.

    Hopefully, emacs has a untabify function that converts tabs to spaces and the buffer local variable indent-tabs-mode must be set to generate spaces on tab press.

    -- stefp

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-12-18 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls