[Israel.pm] Tabs vs. Spaces

Yuval Yaari yuval at windax.com
Tue Jun 15 11:04:21 PDT 2004


Mikhael Goikhman said:
> In my opinion, trying to align something on _different_ indentation
> levels is always a bad idea. If you absolutely want to document each
> line independently, then you should not worry that two completely
> irrelevant comments are misaligned (some use two spaces for such side
> comments). And if this is really just one long comment, then there is a
> more correct place for it. Multiline comments (and sometimes one-line
> comments) deserve their own lines.
>
> # This is a very important loop,
> # it prints 100 empty lines.
> foreach (1..100) {
>     print "\n";
> }
>
> So, at least for our "perfect emacs configurability" dispute, you may
> easily assume that alignment is only meaningful in consequent lines of
> the _same_ indentation level.

This dispute is about style...
And I think aligning comments has a lot of it!

You convinced me into looking at how to do it in emacs, anyway.

Do you indent with tabs/spaces by hand (not editor bashing, I just want to
know if there's an easy way to reach this style)?
Can perltidy indent with tabs, and put spaces in the middle of the line?

  --Yuval





More information about the Perl mailing list