Andrei Alexandrescu napisał: > > Is anyone tasked with a replacement yet? I had to write an XML parser at > > some point. It's plenty of work bringing up to industrial quality, so I'd > > have to know that before I dive in. > > Nobody that I know of. If you want to discuss design here while working > on it, that would be great.
Alright, I'm game. I'll assemble something discussable. > I could think of a few high-level requirements: My requirements are similar. (if I don't comment below, then I agree) > * works with input ranges so we can plug it in with any source > > * works with all UTF widths (statically selectable) > > * avoids where possible memory allocation (perhaps by offering > incremental access a la joiner()) What you mean by incremental access? A lazy range? It's obvious for the lexer, but on a higher level? Not sure if I can start traversing the DOM until the closing tag comes (if at all)... A lazy range of tags defined in the global scope seems possible, though. > * avoids often-called delegates in favor of alias functions What use case of delegates are you talking about? > * is familiar in concept to people who've used today's successful XML > libraries -- Tomek