From: Sebastian Steinlechner Date: 2006-01-29T07:04:06+09:00 Subject: Re: nil != [] --------------enig39DDE9B1834A03A468DCCA3B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Alex Polite wrote: > Well I do understand that it's a convention. They same is true for a > lot of things. Like the positioning of gas and break pedals in cars. > It's just a convention. But when GM puts a new car in the market they > don't swap them. My question is why the constructors of Ruby did? Well... 0 evaluating to false is a convention used mainly in the C/C++ programming world. Many other languages that have been around for years don't treat 0 as false. Pascal being one of them, IIRC. So Ruby is not really breaking with a convention -- as there is none. Sebastian -- Drawing on my fine command of language, I said nothing. --------------enig39DDE9B1834A03A468DCCA3B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD2+pJ8X9UC2T3lakRAsCEAJ9KV6JV719MjGDAsgU1Kf3L1CJJlgCdHYZA qSKY+IUg5t4oyzskofeJ6Ok= =4czZ -----END PGP SIGNATURE----- --------------enig39DDE9B1834A03A468DCCA3B--