From: Matthew Kerwin Date: 2016-03-15T20:32:08+10:00 Subject: [ruby-core:74337] Re: [Ruby trunk Feature#12134] Comparison between `true` and `false` --===============1241516138== Content-Type: multipart/alternative; boundary=001a113feffac99c3f052e13e87d --001a113feffac99c3f052e13e87d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/03/2016 2:54 PM, wrote: > > Issue #12134 has been updated by Martin D=C3=BCrst. > > > Tsuyoshi Sawada wrote: > > > Please do not confuse this with the common proposal to map booleans to integers, particularly `true.to_i # =3D> 1` and `false.to_i # =3D> 0`. That= is arbitrary, and does not make sense. > > In absolute terms, it is arbitrary. But it's the most widely used mapping, and therefore would make much more sense than any other mapping. > In VisualBasic TRUE =3D=3D -1, which is handy for bitwise operations (TRUE = & x =3D=3D x) --001a113feffac99c3f052e13e87d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 07/03/2016 2:54 PM, <duerst= @it.aoyama.ac.jp> wrote:
>
> Issue #12134 has been updated by Martin D=C3=BCrst.
>
>
> Tsuyoshi Sawada wrote:
>
> > Please do not confuse this with the common proposal to map boolea= ns to integers, particularly `true.to_i # =3D> 1` and `false.to_i # =3D&= gt; 0`. That is arbitrary, and does not make sense.
>
> In absolute terms, it is arbitrary. But it's the most widely used = mapping, and therefore would make much more sense than any other mapping. >

In VisualBasic TRUE =3D=3D -1, which is handy for bitwise op= erations (TRUE & x =3D=3D x)

--001a113feffac99c3f052e13e87d-- --===============1241516138== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============1241516138==--