[challenge] To implement XPath 2.0 in D

Justin Johansson no at spam.com
Wed Sep 15 05:30:34 PDT 2010


On 14/09/2010 12:16 AM, Justin Johansson wrote:
> Is D2 suitable to implementing the W3C specifications
> for XPath 2.0, and particularly the XPath & XQuery Data
> Model (XDM), with both coding succinctness and runtime
> time and space efficiency?
>
> Now, by suitability, I don't mean if it can be done. Of course
> it can be done in COBOL, assembler or any Turing machine
> if one tries hard enough.
>
> The challenge for D2 is to show that these W3C specs
> can be implemented in D2 with ease (as say compared to
> implementation in C++ or Java).
>
> The biggest challenge that I see in any intelligent
> implementation of these W3C specifications is to
> produce an implementation that
> (1) makes good balance of space and time complexity
> from an algorithmic point of view
> (2) demonstrates a well-read codification in the target
> language which mirrors well, that is traceability,
> with the W3C XPath/XDM specifications.
> (3) implicit in (1) and (2) the target language lives
> up to its expectations as advertised to be capable of
> producing a concise and succinct implementation of
> something as complex as XPath 2.0.
>
> Is D2 up to a challenge a steep as this?

To make this challenge a bit more realistic in what is
humanly possible for a $64K question, let's reduce this
challenge to an XPath 2.0 implementation which ignores
XML node types as possible XDM item types.

I resubmit this challenge to address only the atomic
item types (i.e. such as xs:anyAtomicType, xs:decimal,
xs:integer, xs:string and xs:boolean) ignoring anything
else that is related to XML.

Me thinks this diluted challenge remains difficult to
implement in D (or C++ or Java for that matter).

-- Justin Johansson



More information about the Digitalmars-d mailing list