[xquery-talk] [xml-dev] Mistakes made in the design of XQuery 3.1

Benito van der Zander benito at benibela.de
Wed May 13 05:05:40 PDT 2015


Hi,

> As you say, in order to “educate” those guys about how to avoid the traps of building a silly query language of their own for JSON/semi-structured data
>    (because querying semi-strcuturded data is NOT trivial and   COMPLETELY different from querying flat, regular, relational data, so, no, SQL is NOT an answer…),
>   you need to be a  little … “diplomat”… and understand THEIR needs, and talk THEIR language.

Still JSONiq screwed up, when they did not think of an equivalent for 
$element/(child1, child2)/foo

At least $object . ("child1", "child2") . foo should have been allowed

> We did a mistake though, and forgot to rename “for" into “from” and “return” into “select” though …

And the XQuery WG made a mistake, when they did not added macros.

#define from for
#define select return

I like C


Best,
Benito


On 13.05.2015 11:31, daniela florescu wrote:
>> You misread me. Though not an expert but I have written some  JSONiq so I can appreciate what you are saying.
>>
>>   When i say JSON people I mean people like Marc (from the linkedin discussion you started) and some others I have worked with who believe all the myths  and think everything can and should be done in JSON. OK maybe not that far out because such a person would never come to an XQuery WG but you know the sort of people I mean.
>>   
>
> Yes, there are plenty of people in the world who consider XML and everything related to it (including XQuery) evil…..and JSON is all they want to see.
>
>
> There are PLENTY of those.
>
> As you say, in order to “educate” those guys about how to avoid the traps of building a silly query language of their own for JSON/semi-structured data
>    (because querying semi-strcuturded data is NOT trivial and   COMPLETELY different from querying flat, regular, relational data, so, no, SQL is NOT an answer…),
>   you need to be a  little … “diplomat”… and understand THEIR needs, and talk THEIR language.
>
> Stuff that the esteemed XQuery 3.1 WG had no clue how to do. I guess they didn’t care either.
>
> Otherwise you end up with those hacks that are all the JSON query languages designed by Cassandra, MongoDb, etc, etc.
>
> No expressive power, and, worse, no clean semantics. (“let’s run it, and see what this query means”…... kind of semantics..)
>
> =============
>
> Hence the subset of JSONiq, which is based on the rich expressive power of XQuery and has the clean semantics of XQuery, yet syntactically
> had absolutely NO mentioning of angle brackets AT ALL.
>
> Just pure, pure JSON.
>
> We did a mistake though, and forgot to rename “for" into “from” and “return” into “select” though …
>
>
> I am shocked when I hear people telling me that they don’t understand the semantics of
>
> for $x in collection(“blah”)
> return $x.a
>
> but it is obviously clear to them the semantics of the following expression
>
> from $x in collection(“blah”)
> select $x.a
>
>
> ===========
>
>
> What can I say !? We learned that habits are extremely strong for some people, and keywords hold a powerful meaning….
>
>
> Best regards
> Dana
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk



More information about the talk mailing list