Finalizing D2

Michel Fortin michel.fortin at michelf.com
Sat May 23 19:38:48 PDT 2009


On 2009-05-23 01:25:49 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

> * std.xml: replace with something that moves faster than molasses.

I started to write an XML parser using D1 and a pseudo-range 
implementation a little while ago, but never finished it. (I was 
undecided about the API, and that somewhat killed my interest.)

Perhaps I should finish it and contribute to Phobos.

The irking thing about the API was that if I expose a range for parsing 
and returning tokens, I then need a switch statement to do the right 
thing about each kind of these tokens (like instantiating the proper 
node type) whereas with a callback API you don't need to bother saving 
and then switching on a flag value telling you which kind of node 
you've read (and callbacks can be aliases in templates). They are two 
different compromises between speed and flexibility and I guess both 
should be supported.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list