I never said it was, he specifically said as an aside for a book he was writing. He said he hadn't heard of code using it, so I provided an example
You are talking about an *internal implementation detail* in the C code
of the Javascript engine, not a Javascript language feature. There is no
Javascript API for the JS programmer to perform NAN boxing or to encode
pointers inside the 51 payload bits of NANs.
I never claimed there was, just that that was a use case of tagged nans, was common for JS engine implementers to use, and indeed was a use case in which inspecting the payload bits and having unique nan values was relevant.
Imagine that a Python program would use a `libc` binding (for example, C-types) to interface with such an engine. It would have to be able to differentiate.
Obviously, there are good reasons Python doesn't support it, and people shouldn't grow to expect it, and this isn't really relevant to the discussion (insofar as the PEP proposed doesn't specify that 'inf' and 'nan' be treated as singletones, just as default builtins).
This would become relevant, if, say Python 4.0 migrated 'inf' and 'nan' to builtin names (like True and False). If that happened, a 'nan' singleton wouldn't make sense unless you had 2**53 of them, so code like:
>>> x is nan
Would be a flawed formulation
Thanks,
----
Cade Brown
Research Assistant @ ICL (Innovative Computing Laboratory)