Russel Winder wrote:
There is currently a big debate in the Groovy mailing list about
introducing:

        <expression> if <condition>
and
        <expression> unless <condition>

constructs into the language.

So, they've solved all the important problems with the language, then?

Anyone familiar with Perl or Ruby will
have come across this "condition after expression" construct.

If they do introduce them (and personally, I'd be in favour),
make sure they don't end up in the position that Ruby is in,
where:

  foo if bar;

and

  if bar then foo end;

can have different semantics.  See here for more info:

  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6684

Of course, if they want ultimate freedom of expression, they
ought to sanction:

  if foo then bar else baz end unless quux;

Severely confused programmers all round!
--
Frank Wales [EMAIL PROTECTED]

Reply via email to