On Sat, 2004-10-30 at 01:47, "Pea, Botp" wrote:
> //I still don't see a reason for #true? and #false?.
> 
> it's a language problem. ruby caters english and sometimes the language does
> not fall immediately into ones (non-english) ears... Thus the op was asking
> if he could be more explicit+...
> 
> consider:
> 
> a = (1 > 0)

this will return a boolean, so it doesn't fit in my example.
try, a = Foo.new and consider your examples.
You will know, what I mean.

--
Mohammad



> if a
>    block
> end
> 
> At a first glance (assumming sans k on progg lang), one has to know
> semantics of if. And here, one realizes that block executes if a is true.
> 
> now consider:
> 
> if a.true?
>    block
> end
> 
> Surely, one can deduce that block will execute if a is true.
> 
> and
> 
> if a.false?
>    block
> end
> 
> Surely, one can deduce that block will execute if a is false. One does not
> need to bend mind just to say "if not a". Why would one want to say "not
> true" when he can say "false"?
> 
> And besides,
> 
> "if a" does not look o-o to me (only).
> "if a.is_a" or "if a.kind_of" looks o-o.
>