From: furufuru@... (Ryo Furue) Date: 2001-08-08T17:16:27+09:00 Subject: [ruby-talk:19361] Re: Speaking of the ternary operator.... David Alan Black wrote in message news:... [...] > I seem to remember at one point someone saying that the ternary > operator might be vanishing from Ruby at some point. [...] > Personally I wouldn't miss it, though that's neither here nor there. Personally I would miss it! To me this avar = (i > 3) ? large : small looks clearer and cleaner than avar = if i > 3 then large else small end The problem (to me) with the latter is that the keywords ("then", "else", and "end") don't look different enough from the identifiers ("large" and "small"). Although I like Ruby very much and prefer it to Perl, this aspect of Ruby is the last thing I like. For example, I'd prefer if (somecond) {puts message; exit 1} to if somecond then puts message; exit 1 end (Have I got it right? I'm still new to Ruby.) In the former, you can tell at a glance which is the condition and which is the block of code. In short, a pair of braces is better than a pair of keywords in one-liners. Also, compare a C-like if (cond) method(arg) with a Ruby counterpart if cond then method(arg) end What do you think? Cheers, Ryo