[Israel.pm] Tabs vs. Spaces

Mikhael Goikhman migo at homemail.com
Tue Jun 15 07:38:20 PDT 2004


On 12 Jun 2004 20:55:41 +0300, Yuval Yaari wrote:
> 
> [That is, lines indented by tabs only].
> It's readable, basically, but it's not as convinient as if things are
> aligned.

I guess we will not be able to agree on alignment. Personally I think
the code aligned to parentheses is strewn and thus ugly estetically.
And you basically need to reindent such code every time you rename some
variable/function or add some more code before the parentheses. I like
unbeatable simplicity and structure of the code indented by tabs only.

Anyway, like I said, there is the second policy that is still tab size
independent, but allows an optional alignment you like, using spaces.

> Generally, if your company style mentions a tab-size (and it would)

Do you have a reason to believe it would? This is not my experience.
Mandating the tab-size independent style seems more probable.

Please also note, in all policies except for the third one, tabs are
forbidden in the middle of lines. Use spaces if you absolutelly need to
align something in two lines of the same level. No tabs in the middle.

> Ok, just FYI - CPerl mode can use the indention styles that I hate and it
> looks good in any editors with any tab size.
> Yes, I checked. I tested on a few editors with different tab sizes.

Do you mean, you may take any complex code, select it and a magical key
will make it fully compatible with the first policy (and then the second
policy), including the no-tabs in the middle rule? Please send me the
config then, I will include it in the documentation of my projects. :)

Regards,
Mikhael.

-- 
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'



More information about the Perl mailing list