I vary on where the listor array goes.

As for Ruby, yes you can arrange them that way. I don't code much Ruby, but when I do one of the decisions that I curse is making the semi-colon optional. Without it you need to give a hint that the line will continue. I hate having to remember what hints will work. So I don't. I remember that blocks span, and then stick to that. But the flip side is that I won't think of better spatial arrangements from time to time.

As for whether right to left or left to right is best, well your eye tends to move left to right across the text because that is how the words are written, and how we read English. What that means is that any time your flow of logic goes right to left, your eye has to jerk back and forth in different directions between different spots on the page. Take out some code, read it, and you will see what I mean.

Personally I would be happier if there was a left to right assignment operator, and I could read everything left to right, top to bottom. And it isn't so unreasonable to ask for that. Think about shell scripts. That is how the Unix pipeline goes, and I think it is much more intuitive for that design.


In reply to Re (tilly) 5: built-ins sometimes iterating over a list, sometimes not by tilly
in thread built-ins sometimes iterating over a list, sometimes not by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.