On 13.10.2016 01:06, Mikhail V wrote:
On 12 October 2016 at 23:48, M.-A. Lemburg firstname.lastname@example.org wrote:
The hex notation for \uXXXX is a standard also used in many other programming languages, it's also easier to parse, so I don't think we should change this default.
In programming literature it is used often, but let me point out that decimal is THE standard and is much much better standard in sence of readability. And there is no solid reason to use 2 standards at the same time.
I guess it's a matter of choosing the right standard for the right purpose. For \uXXXX and \UXXXXXXXX the intention was to be able to represent a Unicode code point using its standard Unicode ordinal representation and since the standard uses hex for this, it's quite natural to use the same here.
s = "\u123456" s
With decimal notation, it's not clear where to end parsing the digit notation.
How it is not clear if the digit amount is fixed? Not very clear what did you mean.
Unicode code points have ordinals from the range [0, 1114111], so it's not clear where to stop parsing the decimal representation and continue to interpret the literal as regular string, since I suppose you did not intend everyone to have to write \u0000010 just to get a newline code point to avoid the ambiguity.
PS: I'm not even talking about the breakage such a change would cause. This discussion is merely about the pointing out how things got to be how they are now.