[DGD] another casting idea
Par Winzell
zell at skotos.net
Fri Jul 16 10:07:18 CEST 2004
Robert Forshaw wrote:
> (int)"0xFFFFF"
>
> (converts "hex string" to integer).
This would be handy, but I think the casting is not really supposed to
be handy, i.e. it's not supposed to be a replacement for an atoi() kind
of function. Specifically, I suspect Felix would like to keep casting as
close to a fully one-to-one (bijective) mapping as possible (excepting
whitespace considerations).
The proposed extension would violate the surjective portion of bijective
because while each integer N is mapped by casting to a single string N
("N"), there'd be two strings ("N") and ("0xNhex") that map back to N.
This is admittedly a fairly abstract consideration, and in no way to do
I speak for Felix... but I'm guessing. :)
Zell
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list