[Israel.pm] Number of Indentation Levels in Ruby and Perl
Shmuel Fomberg
semuelf at 012.net.il
Mon Jun 1 13:19:05 PDT 2009
Mikhael Goikhman wrote:
>> Shlomi Fish observed that Ruby scripts use much more indentation levels
> Let's attempt to analyze a bit.
I want to add to Mikhael's ideas, that maybe Ruby's syntax encourage
high indentation level. for example, as much as I understand, you can
write something like:
some.chained.call.each { |item|
<code>
};
and if Rudy style encourage large blocks of code in this
iterator, then the whole code will shift right significantly.
In Perl, it will be translated to foreach / loop block, with one
indentation level. and most of the people does not write large code
inside map/grep/sort code blocks.
Shlomi, does that make sense?
Shmuel.
More information about the Perl
mailing list