Range interface for std.serialization

Dicebot public at dicebot.lv
Thu Aug 22 07:48:55 PDT 2013


On Thursday, 22 August 2013 at 03:13:46 UTC, Tyler Jameson Little 
wrote:
> On Wednesday, 21 August 2013 at 20:21:49 UTC, Dicebot wrote:
>> It should be range of strings - one call to popFront should 
>> serialize one object from input object range and provide 
>> matching string buffer.
>
> I don't like this because it still caches the whole object into 
> memory. In a memory-restricted application, this is 
> unacceptable.

Well, in memory-restricted applications having large object at 
all is unacceptable. Rationale is that you hardly ever want 
half-deserialized object. If environment is very restrictive, 
smaller objects will be used anyway (list of smaller objects).

> ...
> There's no reason why the serializer can't output this in chunks

Outputting on its own is not useful to discuss - in pipe model 
output matches input. What is the point in outputting partial 
chunks of serialized object if you still need to provide it as a 
whole to the input?


More information about the Digitalmars-d mailing list