GSoC 2016 - std.xml rewrite

Marc Schütz via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 10 03:22:59 PST 2016


On Tuesday, 8 March 2016 at 18:01:25 UTC, Lodovico Giaretta wrote:
> - one accepting InputRanges, that can work with almost any data 
> source and does not require the entire input to be available at 
> the same time; it's cons are that it must allocate lots of 
> small strings (one for each token) and grow them one char at a 
> time, so it's not so fast;

It could reuse its buffer though, and deal in `const(char)[]` 
instead of `string`. The consumer is responsible for copying if 
they need it. But I guess this will only be useful for the pull 
parser, or for one-pass filters/lookups.

> This is just an early sketch, but I'd love to get some feedback.
> Thank you for your time.

You might also check out Steven Schveighoffer's experimental IO 
module for stream parsing:

https://forum.dlang.org/thread/na14ul$30uo$1@digitalmars.com


More information about the Digitalmars-d mailing list