std.xml2 (collecting features)

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Sat May 9 03:28:52 PDT 2015


On Monday, 4 May 2015 at 18:50:43 UTC, Marco Leise wrote:
> On Sunday, 3 May 2015 at 17:47:15 UTC, Joakim wrote:
>
>> My request: just skip it.  XML is a horrible waste of space 
>> for a standard, better D doesn't support it well, anything to 
>> discourage it's use.  I'd rather see you spend your time on 
>> something worthwhile.  If data formats are your thing, you 
>> could help get Ludwig's JSON stuff in, or better yet, enable 
>> some nice binary data format.
>
> You two are terrible at motivating people. "Better D doesn't
> support it well" and "JSON is superior through-and-through" is
> overly dismissive. To me it sounds like someone saying replace
> C++ with JavaScript, because C++ is a horrible standard and
> JavaScript is so much superior.  Honestly.

You seem to have missed the point of my post, which was to 
discourage him from working on an XML module for phobos.  As for 
"motivating" him, I suggested better alternatives.  And I never 
said JSON was great, but it's certainly _much_ more readable than 
XML, which is one of the basic goals of a text format.

> Remember that while JSON is simpler, XML is not just a
> structured container for bool, Number and String data. It
> comes with many official side kicks covering a broad range of
> use cases:
>
> XPath:
>  * allows you to use XML files like a textual database
>  * complex enough to allow for almost any imaginable query
>  * many tools emerged to test XPath expressions against XML 
> documents
>  * also powers XSLT
>    (http://www.liquid-technologies.com/xpath-tutorial.aspx)
>
> XSL (Extensible Stylesheet Language) and
> XSLT (XSL Transformations):
>  * written as XML documents
>  * standard way to transform XML from one structure into another
>  * convert or "compile" data to XHTML or SVG for display in a 
> browser
>  * output to XSL-FO
>
> XSL-FO (XSL formatting objects):
>  * written as XSL
>  * type-setting for XML; a XSL-FO processor is similar to a 
> LaTex processor
>  * reads an XML document (a "Format" document) and outputs to a 
> PDF, RTF or similar format
>
> XML Schema Definition (XSD):
>  * written as XML
>  * linked in by an XML file
>  * defines structure and validates content to some extent
>  * can set constraints on how often an element can occur in a 
> list
>  * can validate data type of values (length, regex, positive, 
> etc.)
>  * database like unique IDs and references

These are all incredibly dumb ideas.  I don't deny that many 
people may use these things, but then people use hammers for all 
kinds of things they shouldn't use them for too. :)

> I think XML is the most eat-your-own-dog-food language ever
> and nicely covers a wide range of use cases.

The problem is you're still eating dog food. ;)

> In any case there
> are many XML based file formats that we might want to parse.
> Amongst them SVG, OpenDocument (Open/LibreOffics), RSS feeds,
> several US Offices, XMP and other meta data formats.

Sure, and if he has any real need for any of those, who are we to 
stop him?  But if he's just looking for some way to contribute, 
there are better ways.

On Monday, 4 May 2015 at 20:44:42 UTC, Jonathan M Davis wrote:
> Also true. Many of us just don't find enough time to work on D, 
> and we don't seem to do a good job of encouraging larger 
> contributions to Phobos, so newcomers don't tend to contribute 
> like that. And there's so much to do all around that the big 
> stuff just falls by the wayside, and it really shouldn't.

This is why I keep asking Walter and Andrei for a list of "big 
stuff" on the wiki- they don't have to be big, just important- so 
that newcomers know where help is most needed.  Of course, it 
doesn't have to be them, it could be any member of the D core 
team, though whatever the BDFLs push for would have a bit more 
weight.


More information about the Digitalmars-d mailing list