[Issue 9558] 0b and 0x prefixes for std.string.isNumeric

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Sep 8 10:45:29 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=9558

hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx

--- Comment #1 from hsteoh at quickfur.ath.cx ---
I'm not sure about this. The '0x', '0b', etc., prefixes are syntax defined by
programming languages, whereas isNumeric is intended to check user input.
Presumably, most users wouldn't know what 0x, 0b, etc., are, and may be
surprised to learn that what they consider as invalid input (e.g. 0b10) is
actually accepted by the program, with results that are unexpected to them.

Parsing programming language literals should not be conflated with parsing user
input.

--


More information about the Digitalmars-d-bugs mailing list