From: "Esteban Manchado Velázquez" Date: 2004-11-02T06:22:56+09:00 Subject: Re: Another scrach on head --FEz7ebHBGB6b2e8X Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 02, 2004 at 06:05:00AM +0900, Mohammad Khan wrote: > [...] > > See, that's why I'm not getting this. I don't see the value of: AOL > > if options['verbose'].true? >=20 > This is more OOP > >=20 > > over > >=20 > > if options['verbose'] =3D=3D true >=20 > This is more functional >=20 > As a OOP programmer, I will choose the first one. > Call me dumb, I don't care ! > :p Just one question: why on earth would we want "obj.true?" to be differe= nt =66rom "obj" from a boolean perspective? It's _very_ weird. You could write aberrations like: -------------------------------- 8< -------------------------------- if obj.true? # Do something elsif obj # Do some other thing else # Do a third thing end -------------------------------- >8 -------------------------------- Not very readable to my eyes... and anyway, IMHO, a comparison has nothing= to do with OOP. Objects _can_ be compared, too :-) I don't think "true?" adds anything to the language. If you want to use "true?" because you find it more readable, why don't you simply extend the Object class? Regards, --=20 Esteban Manchado Vel=E1zquez - http://www.foton.es EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es --FEz7ebHBGB6b2e8X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBhqkhhYgK5b1UDsERAi/AAJ9eViMyMlah/rZwE9xkZ5VNHDDUJwCfW9Cd KKSGKs9uaIfwe4NzXGkX3Og= =Sd7h -----END PGP SIGNATURE----- --FEz7ebHBGB6b2e8X--