BigInt bool assign
Derek
ddparnell at bigpond.com
Fri Dec 23 14:07:20 PST 2011
On Fri, 23 Dec 2011 23:42:24 +1100, bearophile <bearophileHUGS at lycos.com>
wrote:
> Here I ask for opinions about a small enhancement request about BigInt
> that Don has refused ...
I'm with Don on this one because a boolean and an integer are not the same
concept, and even though many programming languages implement booleans
using integers, it still doesn't make them the same thing.
Using booleans as implicit integers can be seen as laziness (i.e. poor
documentation of coder's intent) or a legitimate mistake (i.e
unintentional usage by coder). By insisting that an explicit cast must be
used when one wants a boolean to behave as an integer allows the coder's
intent to become more apparent when reading their source code. This has
nothing to do with machine code generation, just source code legibility.
--
Derek Parnell
Melbourne, Australia
More information about the Digitalmars-d
mailing list