Range interface for std.serialization

Jacob Carlborg doob at me.com
Thu Aug 22 09:10:28 PDT 2013


On 2013-08-22 16:52, Dicebot wrote:

> Is there a reasons arrays needs to be serialized as (1), not (2)?

For arrays, one advantage is that I can allocate the whole array at once 
instead of appending, since the length of the array is serialized.

> I'd expect any input-range compliant data to be serialized as (2) and lazy.
> That allows you to use deserializer as a pipe over some sort of
> network-based string feed to get a potentially infinite input range of
> deserialized objects.

I still don't know how I would deserialize a range. I need to know the 
type to deserialize not just the interface.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list