From: "trans. (T. Onoma)" Date: 2004-10-31T07:39:52+09:00 Subject: Re: New Ruby conditional semantics thoughts Nice work. Your explanation is a bit terse, but I'll take it :) I forwarded this on to suby-ruby. Hope that's okay by you. Thanks, T. On Saturday 30 October 2004 05:58 pm, Brian Mitchell wrote: | The basic background was begun by someone asking a question about | boolean expressions and _why_ Ruby treats expression results nil and | false as a *false* path in a boolean conditional. Some just explained | that nil is like empty so it is nice to treat is like false. | Someone then pointed out how one could use the methods false? and | true? on the object to test its value. This immediately reminded me of | smalltalk conditional design and possible ways one could implement | something similar in Ruby. For example, here are smalltalk | conditionals implemented in Ruby: | | module Kernel | def _if(exp, &block) | else_block = callcc { |cont| | @condition = cont | | [snip]