Vote: deprecate std.xml?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Jan 17 21:59:07 UTC 2020


> On Monday, 13 January 2020 at 11:09:15 UTC, rikki cattermole
> wrote:
> > dxml is the closest and the author isn't keen to go down that
> > right now.
>
> Would be nice to know, why.

Honestly, the only reason that I would consider putting dxml through the
Phobos review process to get it into Phobos would be because we already have
an XML parser in there that we want to get rid of, and if we keep it in
there until we have a replacement, then we'll need a replacement eventually.
However, I really don't think that Phobos is the right place for parsers for
document formats. I come from a C++ background, and that strongly colors my
view on what belongs in a standard library. XML is a relatively common
format, but it's not the sort of thing that your average application is
going to be parsing. So, I don't think that a parser for it belongs in the
standard library. Personally, I'd much rather that we just move std.xml to
undead and leave XML parsing to libraries on code.dlang.org.

However, even if I did want to get dxml into Phobos, there are further
improvements that I would like to make to it first (e.g. implementing
support for some of the enhancement requests that I've gotten), and I need
to find the time to do that. Either way, I certainly don't have the time or
energy to push dxml through the Phobos review process right now.

Going through the Phobos review process would result in a lot of
bikeshedding over issues like DOCTYPE support and whether the parser should
be fully @nogc. I have no interest in doing either, but I'd have to spend a
bunch of time arguing about it to get it into Phobos.

Also, once the parser is in Phobos, I lose control of it. Right now, I can
make whatever changes I feel make sense. Obviously, I don't want to break
existing code that uses it, but I don't have to argue with other people
every time that I want to make a change to the code. To get it into Phobos,
I'd have to do a lot of arguing to get it in, and then I'd have to do more
arguing every time I wanted to make a change. I'd much rather avoid all of
that pain - especially since I don't think that an XML parser belongs in a
standard library in the first place. If someone wants to use dxml, it's
easily fetched using dub, and if someone doesn't want to use dub, it's
trivial enough to download the code and integrate it into their project
however they feel like it.

- Jonathan M Davis





More information about the Digitalmars-d mailing list