Is the world coming to an end?
Adam D. Ruppe
destructionator at gmail.com
Sun Apr 3 09:04:42 PDT 2011
Walter Bright wrote:
> And yes, you can make a reasonable case that 0b should be ditched
> for the same reason.
I know people already think of the isIntegral versions of octal
as a hack, but I see that as one reason why binary wouldn't work
as well as a template:
binary!1111_1111_0000_0000
Overflow city! Such long numbers aren't terribly common in octal,
but they /are/ in binary.
Of course, you can just use the string version, so it isn't a
big deal, but nevertheless, it is a difference.
btw, it might be worth considering a change to overflow. Suppose
there was a way to get arbitrary size ints passed to a template.
Then, the library could do its own overflow checks, or not, enabling
things like bigint literals in this same fashion.
Though, I don't think it's a big benefit. It'd be really weird
to use (a new compile time only datatype?)
And if you actually need that, the string version works just fine.
So all in all I don't think it's worth it.
More information about the Digitalmars-d
mailing list