On 4 Jun 2007, at 15:48, Robert Dober wrote: > On 6/4/07, Eleanor McHugh <eleanor / games-with-brains.com> wrote: >> On 4 Jun 2007, at 06:09, Robert Dober wrote: >> > On 6/3/07, Eleanor McHugh <eleanor / games-with-brains.com> wrote: >> >> On 31 May 2007, at 06:35, Robert Dober wrote: >> >> > But maybe things should really by simple >> >> > >> >> > return if x > 42 >> >> > return unless (x+1)%2 == 0 # not zero? here >> >> > >> >> > could probably made syntactically work (differently than now) >> and >> >> > return the LHS of the expression iff the expression evaluates to >> >> true >> >> > or false respectively. >> >> >> >> Unfortunately this would greatly complicate the situation in >> which a >> >> return without value is intended... >> > That does not exist :) >> >> The _intent_ often exists, regardless of the fact that Ruby always >> returns a value ;) > I am not a native speaker but nevertheless I get the feeling that you > are cheating here ;) > Am I right? Guilty as charged ;) Whilst I think syntax such as return if x > 42 being equivalent to return (x | nil) if x > 42 is elegant, it would mandate that return nil always be explicit in this particular case. I know that I'd have a devil of a time remembering to do that consistently lol Ellie Eleanor McHugh Games With Brains ---- raise ArgumentError unless @reality.responds_to? :reason