std.json parsing real numbers.

Ali Çehreli acehreli at yahoo.com
Thu Aug 8 14:47:17 PDT 2013


On 08/08/2013 11:46 AM, Borislav Kosharov wrote:
 >>> > I wrote not a "1.24E+1", a "1     .24E     +1"  with leading > 
spaces.
 >>>
 >>> Well what should it be if it's not 12.4?
 >>
 >> A syntax error.
 >
 > I don't think this would cause any problems. It would just throw syntax
 > error because there is white-space between? It would be just annoying to
 > get syntax error because of extra white-space.
 >
 > Maybe this is one of the situations where we should think "It's not a
 > bug, it's a feature!"
 >
 > Unless there is a situation that would make no sense to work or
 > something, it should be left like it is now.

How about integers? I wouldn't expect "4 2" to be parsed silently as 42.

Ali



More information about the Digitalmars-d mailing list