Status of std.xml (D2/Phobos)
Justin Johansson
no at spam.com
Tue Jun 29 13:29:51 PDT 2010
Andrei Alexandrescu wrote:
> Justin Johansson wrote:
> Clearly std.xml can't stay the way it is. I'm even thinking of removing
> it preemptively in wait for another implementation.
Others in this thread have suggested a preemptive removal of the current
std.xml incarnation also. Please add my vote to this in agreement that
it *must* go. It's current state is well beyond absolutely shocking and
only serves to bring D into disrepute. It would be much better to say,
"sorry, D does not have a standard XML library yet"*** and ask for help
rather than leaving things as they are.
***Reminds me of an old saying, "it's better to keep your mouth shut
and appear to be an idiot than to open it and remove all doubt".
( Of course, I do confess to opening mine once or twice too often ;-) )
Translated to std.xml, this means better not to have it at all rather
than have what we currently have.
> If you want to work on something you enjoy, it seems like std.xml is a
> good choice. If you want to work on the top most important item,
> probably networking would come ahead. We badly need http and ftp
> streaming libraries. I'm thinking libcurl would be a good choice as a
> backend (not interface). For D integration, it would be great to
> integrate networking with std.stdio.File - e.g. creating
> File("http://xyz.org") would just connect to the thing and allow
> streaming, ranges, everything. Adam Ruppe has a lower-level networking
> protocol that also hooks into std.stdio.File, which would be very
> important to have too.
Sure I do enjoy XML ecosystem stuff and by that I mean well beyond
just simple parsing. OTOH, streaming libraries for http and ftp
are an absolute necessity to underpin industrial strength all things
both Unicode and XML so I can see why you put this at the top of the
wish list. Robust streaming should have support not only for all
popular network protocols but content (character) encodings as well.
Since this thread has promoted a lot of ideas about std.xml, I think
we would do well to start a new thread on streaming.
Cheers
Justin Johansson
> But then it's often better to work on what you like, so don't look for a
> landslide vote. Ford didn't work on a faster horse etc. Some things that
> would be good to have in an xml library:
>
> - should work with input ranges (not only strings)
>
> - use aliases as lambdas if needed (std.xml's use of lambdas is nice,
> just very slow)
>
> - define templates for char, wchar, and dchar and then define one
> working with ranges of ubyte that dispatches depending on the encoding
> tag found.
>
>
> Andrei
More information about the Digitalmars-d
mailing list