ary.map {x| x.succ}
instead of
ary.map {|x| x.succ}
Possibly we could introduce the change as a parallel syntax, leaving both available.
Warning:
a=0; b=1
proc { a | b }
is it 'a' a formal argument or a reference to an external variable BitOR'ed with b ?
a=0;b=1
proc {| a|b }
not a big deal for really rare cases.If both syntax are available this may be hard to check. We could be forced to write
proc { || a|b}for this case
- Jamis Buck
Thanks, James. I feel same way. Actually, in the pre-relase phase (back in 1993), the block parameter syntax was exactly what you described here. I changed the syntax for the particular reason which James stated above.
-matz.
I did not mind about parsing efficiency cause we're going to have a bytecompiled form for our script sometime in the future. But It seem I'm the only one that finds the proposed new syntax more clear than the old. Ok, let's kill this rcr :)
- grenzi
- Jamis Buck
Thanks, James. I feel same way. Actually, in the pre-relase phase (back in 1993), the block parameter syntax was exactly what you described here. I changed the syntax for the particular reason which James stated above.
-matz.
I did not mind about parsing efficiency cause we're going to have a bytecompiled form for our script sometime in the future. But It seem I'm the only one that finds the proposed new syntax more clear than the old. Ok, let's kill this rcr :)
- grenzi
Back to RCRchive.
RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog