[Israel.pm] Tabs vs. Spaces

Mikhael Goikhman migo at homemail.com
Tue Jun 15 09:30:30 PDT 2004

On 15 Jun 2004 18:01:24 +0300, Yuval Yaari wrote:
> Again, I forgot about the spaces in the middle instead of tabs.
> I see no point in that.
> Why? Here:
> foreach (1..100) { # comment
>     print "\n";    # new comment
> }

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.


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

More information about the Perl mailing list