std.json sucessor

Kiith-Sa via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 13 10:40:44 PDT 2014


On Monday, 13 October 2014 at 17:21:44 UTC, Sönke Ludwig wrote:
> Am 13.10.2014 16:36, schrieb Daniel Murphy:
>> "Sönke Ludwig"  wrote in message 
>> news:m1ge08$10ub$1 at digitalmars.com...
>>
>>> Oh, I've read "both line and column into a single uint", 
>>> because of
>>> "four words per token" - considering that "word == 16bit", 
>>> but Andrei
>>> obviously meant "word == (void*).sizeof". If simply using 
>>> uint instead
>>> of size_t is meant, then that's of course a different thing.
>>
>> I suppose a 4GB single-line json file is still possible.
>
> If we make that assumption, we'd have to change it from size_t 
> to ulong, but my feeling is that this case (format error at
> >4GB && human tries to look at that place using an editor)
> should be rare enough that we can make the compromise in favor 
> of a smaller struct size.

What are you using the location structs for?

In D:YAML they're only used for info about errors, so I use 
ushorts and ushort.max means "65535 or more".


More information about the Digitalmars-d mailing list