From: ES Date: 2005-05-12T04:31:38+09:00 Subject: Re: alternatives to ? : contruct Le 11/5/2005, "John-Mason P. Shackelford" a �crit: >As an alternative to: > >a = y == z ? b : c > >we can say: > >a = (b if y == x) || c > >Can anyone think of others? > >I'd really like to be able to say: > >a = b if y==z otherwise c > >but the precedence of _or_ is not low enough for this to work. Would >changing the precedence of _or_ to be lower than expression modifiers >brake much? I believe _or_ is presently just above the expression >modifiers today. Then again perhaps that would be confusing. Perhaps >an _otherwise_ operator would do the trick. Is this not called the 'else' operator? :) >This is trivial really, but ruby specializes in niceties which many >might deem trivial but which all add up to an amazingly productive >environment. > >John-Mason Shackelford E -- template void quack(duck& d) { d.quack(); }