From: KONTRA Gergely Date: 2003-12-14T01:11:03+09:00 Subject: Re: types? casting and bools On 1214, Wesley J Landaker wrote: Content-Description: signed data > On Saturday 13 December 2003 8:37 am, KONTRA Gergely wrote: > > On 1213, Austin Ziegler wrote: > > > On Sat, 13 Dec 2003 01:56:18 +0900, KONTRA Gergely wrote: > > > > Why ruby handle booleans so liberally? > > > It doesn't. Ruby treats all values excepting false and nil as true. > > > It sounds like you're wanting 0 to be treated as false. > > No, I'm just asking how ruby "dare" to convert my 0 to true (or > > false, it is the same). > In ruby, it's very simple and straightforward. Only two things are > logically false: nil, and false. There isn't any "conversion" going on, > it's an intrinsic part of the language. There is no "Boolean" data type > that things are being "converted" to; *everything* is true, *except* > nil and false. This is simple, but I think you must consider the above not to allow everything to be boolean. The time is NOW to change things (before 2.0)... So in Rite will it be the same, or will the simplest class (boolean) finally have its own class? Gergo -- +-[ Kontra, Gergely PhD student Room IB113 ]---------+ | http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy | | Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" | +-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+