I think that was distinguishes LINQ is not that it was the first such
adopted by the community of that language.
in a "how do you get people to use this" sense. For the latter, there's no
even just out of sheer curiosity. It's much harder to get someone
interested in a completely new language in comparison.
necessary to semi-structured data that are unique to XQuery. I've looked at
the posts that you've linked to, and e.g. conditionals/typeswitches,
https://msdn.microsoft.com/en-us/library/dd233182.aspx). Implicit type
the middle of a particularly complicated query. It all depends on the data.
Post by daniela florescuPavel,
NOW we are talking about interesting research !!!! :-))))
Sequence comprehension. Here we goâŠ.:-)
Yes, sequence comprehension (itâs called monoid comprehension in
theoretical computer scienceâŠ.) IS the one of the most important things
for a high level/declarative language.
============
1. Linq is NOT a new idea. My PhD thesis was (partially) about adding SELECT-FROM-WHERE
as an expression to C++. I did it as a pre-processor at that time â
remember, it was 1994.
Others did it too, decades before me !!!! Remember Pascal-R !???
http://archive.nyu.edu/fda/handle/2451/14595
(probably not, because you are too young..)
2. in 2015 XQuery has FROM FAR (!!!!!!!!!!) the most advanced,
expressive-wise, AND
the cleanest semantic-wise version of sequence comprehension.
Every other language should use THAT instead of half-baking
Yet-Another-Sequence-Comprehension.
The FLWOR of XQuery is semantically very clean, has nothing to do with
XML, is compositional and elegant,
and, moreover, optimizable.
3. The discussion : should we add sequence comprehension to an exiting
imperative language vs.
adding scripting extensions to XQuery/high level functional language with
sequence comprehension
is again old as the times.
http://dl.acm.org/citation.cfm?id=1142597&dl=ACM&coll=DL&CFID=522088426&CFTOKEN=80093091
( Donald Kossmann and I had a detailed tutorial at Sigmod 2006, and the
slides were REALLY funny, if I remember correctly)
This was in 2006. (when you read the paper just do a global replace âXMLâ
with âsemi-structured dataâ)
Now, in 2015, I think BOTH alternatives are good, and viable.
For example, adding a FLWOR expression to Javascript is a worthwile thing
to do, and I am implementing this as we speak.
Another example: what do you think that Oracle Fusion was (multi-billion
failure..)!? Just a rewrite of Oracle application, where the code instead
of being written
in PL-SQL was written in Java with SQL.
Same story/question again.
4. Sequence comprehension is necessary for processing data in general,
structured or non-structured.
However, for processing ****SEMI-STRUCTURED DATA**** you need EXTRA other
features, non-existing in
ANY other language except XQuery and XSLT.
I tried to put a list of features needed for semi-structured data in a
previous email to this list, âŠ.
http://x-query.com/pipermail/talk/2015-May/004718.html
http://x-query.com/pipermail/talk/2015-May/004719.html
âŠ..but of course I did it fast, and forgot some of the necessary features.
In particular, I forgot the ability to do metadata search (aka path
expressions where you donât know the data structure).
===========
So, yep. Lots of Computer Science history.
This is why it is DAMN SAD to see those barbarians starting to query JSON
in 2015 like itâs 1995 again âŠâŠ.
Best
Dana
I don't mind at all.
And of course XQuery (well, the parts that are not tied to XDM) is
orthogonal to XML. The way I see it, FLWOR syntax (as well as LINQ etc) is
basically just a very fancy sequence comprehension, and obviously sequences
and trees aren't XML-specific at all.
FWIW, back when I first saw XQuery (which was after LINQ for me), I
remember being somewhat surprised at the choice of "return" especially for
a keyword. It's not that it was unclear what it did, and the mapping to the
more familiar syntax was obvious. It's just that it implies some transfer
of control traditionally, which is obviously not the case here. "yield", as
used in Scala and F#, made a lot more sense.
I don't mind "for" as much, on the other hand, seeing how it's pretty
commonly used for sequence comprehensions elsewhere (Python, Scala, F#
...). I think the main reason why LINQ used "from" instead is to induce a
sense of familiarity for those coming from SQL background, which was 99% of
its target audience.
Side note: I don't think that standalone query languages make much sense
now that integrated syntax for sequence comprehensions has become
mainstream for high-level languages. It's just too much effort to do
explicit interop from, say, Java, C# and JS, to XQuery or JSONiq, and it
introduces a new syntax for concepts which are already represented in the
host language, with said syntax being constrained to one narrow domain
(XML/JSON). I think that the way forward is going to be more like LINQ -
taking (hopefully!) the lessons learned from dedicated query languages and
seamlessly integrating them into the language such that they can work on
its native data model, and mapping XML, JSON etc to that model as
transparently as possible.
Post by daniela florescuPavel, I hope you donât mind that I forward your personal email to the main list.
Thanks for the links.
Yes, I am of course aware of the history of it, but I donât think everyone else is.
(I even gave feedback to Erik Meijer before he submitted this proposal to
Bill GatesâŠ. and I lost
a beer with him because we bet who among the two of us knows XML Schema
better â and he did :-).
1. the principles of XQuery are orthogonal to XML itself and
2. spelling FROM and SELECT seems to matter to people A LOT.
Best regards
Dana
https://msdn.microsoft.com/en-us/library/bb397896(v=vs.140).aspx
Which, ironically, came out of an earlier Microsoft project called CÏ
(and specifically, the subset of it called X#), which was basically an
https://msdn.microsoft.com/en-us/library/ms974195.aspx
It became LINQ after it dropped ties to XDM and was generalized to
operate on arbitrary CLI object graphs instead.
Post by daniela florescuOne thing that did strike me is the link cited in one of the comments
http://queue.acm.org/detail.cfm?id=1961297
Just look at the examples.
Does everyone see what I see !? :-)
Those are just FLWOR expressions, with FOR spelled as FROM and RETURN spelled
as SELECT.
Can we PLEASE add those as synonyms in the XQuery grammar before you
close XQuery 3.1 !?
Otherwise weâll hear for another 100 years that XQuery has nothing to do
with SQL while THIS language
describe in this paper DOES. (sic!)
Itâs dumb, but thatâs how it is.
Pretty please !???
Thanks
Dana
Ihe,
you asked why XQuery is not more popular.
Here is another striking answer to your question: NOBODY KNOWS IT EXISTS.
Just look at this example.
https://www.linkedin.com/pulse/sql-vs-discrepancy-somil-asthana?trk=hp-feed-article-title-like
I quote: "Indisputably, there may be people who are working on Non Relational
Algebra and Non Tuple Relational Calculus, its just that we do not know them.â
[[[Can someone just answer this guy, so I donât have to insult him/her !?
Because I feel a really strong urgeâŠ.Iâll try to breathe and do some
meditationâŠ.]]]
In fact, I know that this is not his/her limitation.
Itâs our OWN failure to explain to the world what XQuery is, what it
does, and what is good at.
Best regards
Dana
P.S. And after that, please DONâT ask me why I am SO pissed off at
MarkLogic who pretend they never ate the garlic, not does
their mouth smell of garlicâŠ..
They MADE all their money out of the power of XQuery (expressiveness,
productivity, etc), yet they pretend theyâve never heard of itâŠ.
Thatâs something that REALLY gets me angry.
And this will come back to bait them on the business side very badly too.
Oracle would have NEVER done the same thing about SQLâŠ..just saying.
_______________________________________________
http://x-query.com/mailman/listinfo/talk
_______________________________________________
http://x-query.com/mailman/listinfo/talk