Mark Volkmann
2/3/2006 2:01:00 PM
On 2/3/06, Kroeger, Simon (ext) <simon.kroeger.ext@siemens.com> wrote:
>
> > if (cond) {meth this; func that} #(2)
>
> how about:
>
> (puts 'this'; puts 'that') if true
I'll chime in and say that I also don't like the ";;" idea.
I've always thought that parens could be used better, so I like
Simon's suggestion. In fact, if I were designing a language from
scratch, I'd use parens differently for method calls.
Instead of
calculate_average(19, sum(4, 7), 3)
I'd make it
calculate_average 19 (sum 4 7) 3
Parens would only be used to group method names with arguments when
there is more than one method call on the same line. Commas aren't
even necessary. Of course this is too drastic of a change to make to
Ruby at this point.
--
R. Mark Volkmann
Partner, Object Computing, Inc.