From: matz@... (Yukihiro Matsumoto) Date: 2001-06-16T22:56:28+09:00 Subject: [ruby-talk:16536] Re: why only nil and false are regarded as false? Hi, In message "[ruby-talk:16529] Re: why only nil and false are regarded as false?" on 01/06/16, Dave Thomas writes: |> I would appreciate some explanation on why Ruby behaves like |> this | |I suspect because the alternatives in other languages were error |prone. I know I've been bitten by loops that terminated prematurely in |Perl. Yes. Plus I wanted performance in boolean tests. Current boolean test can be done in single bit operation in C, no method invocation, no complex switching based on type. |Do you have some examples where you'd like other values to be false? Because some languages require strict boolean for conditions, I think we can live with these two false values. Java has only one false value, we have two. FYI: No, it's not Smalltalkism. Ruby is much influenced by Lisp than Smalltalk. I have never been a Smalltalker, but was Lisp programmer. matz.