in reply to Re: Re (tilly) 3: built-ins sometimes iterating over a list, sometimes not
in thread built-ins sometimes iterating over a list, sometimes not
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.
|
|---|