Replacing std.xml
w0rp
devw0rp at gmail.com
Thu Aug 29 11:40:06 PDT 2013
On Thursday, 29 August 2013 at 09:24:31 UTC, Joakim wrote:
> I think it's great that there's no std.xml, as it implies that
> nobody using D would use a dumb tech like XML. Let's keep it
> that way. :)
JSON is better than XML in every way I can think of. Easier to
map to data structures in whichever language you're using, much
smaller in size, less corner cases, etc. However, just saying XML
is dumb isn't a useful policy. You need ways of parsing XML on
hand until people stop using it.
On Thursday, 29 August 2013 at 08:15:39 UTC, Robert Schadek wrote:
> On 08/29/2013 09:51 AM, Johannes Pfau wrote:
>> I most points here also apply to std.xml:
>> t Those are not strict
>> requirements though, I just summarized what I remembered from
>> old
>> discussions.
> I think, this even extends to access to all semi- and
> structured-data.
> Think csv, sql nosql, you name it. Something which deserves a
> name like
> Uniform Access. I don't want to care if data is laid out
> differently. I
> want to define my struct or class mark the members to fill a
> pass it to
> somebodies code and don't want to care if its xml, sql or
> whatever.
I'm really not so sure about that kind of approach. Automatic
serialisation I think works one of two ways. Either you have
control over the data you're pulling in, and you can change it to
map more easily to your data structures, or you don't and you
have to make your data structures more ugly to fit the data
you're pulling in. I prefer just writing functions that take
format X and give you in-memory representation Y over automatic
serialisation stuff. I know it's boring and easy to write
functions like that, but why can't some things just be boring and
easy?
This looks like a really popular topic, and it's cool that there
seem to be quite a few implementations that are close to being
what we want. I think we're probably not far off just lining up a
few different implementations and reviewing them all for possible
inclusion in phobos.
More information about the Digitalmars-d
mailing list