From: Brian Mitchell Date: 2005-02-23T03:31:45+09:00 Subject: Re: Proposal for nil, 0, and "" in an if statement On Wed, 23 Feb 2005 03:00:03 +0900, Michael Neumann wrote: > Caio Tiago Oliveira wrote: > > Michael Neumann, 22/2/2005 11:25: > >> 100% agree. I especially cannot understand (at least mathematically) > >> why 0 would be empty and 1 not. > >> (...) > > > > > > Binary logic, 0 is false, 1 is true. > > In fact, those are actual symbols and not numbers! exactly! This issue seems to come up on the ML from time to time. I voiced my opinion that Smalltalk conditionals (depending on behavior) are much better than depending on value (check for nil or false). It can be tailored to fit any object easily... but I think the idea lost out to people who would rather keep ruby more of that same and probably a little faster (though there are some things ruby can't do because of this). My vote is still up for .true? {} and .false? {} ;-) I really don't care if you guys agree or not but it sure is elegant. Ruby is already a very good language so I am happy anyhow. > > Regards, > > Michael > > Brian.