Dear Hans-Juergen,
The first functional (aka pure "expression language”) language was Lisp.
It was followed by a series of more sophisticated ones like ML (and all its variants like CaML).
Now probably the most solid functional language used today is Haskell (e.g. Phil Wadler, who contributed
To the design of XQuery, also contributes to Haskell).
Haskell also has monoid comprehensions, which in theory, would make it a “query language”. But its monoid
Comprehensions are not as sophisticated and powerful as XQuery’s.
=====
Now in terms of the history of functional query languages, the first (and only one) before XQuery was OQL - the object oriented
query language.
OQL was probably the main source of inspiration for XQuery, as me, Jerome Simeon, Michael Rys, etc, we all
had our PhDs in query processing for object oriented databases, so we "grew up" with OQL.
In top of that people like Phil Wadler, Mary Fernandez, Denise Draper, etc, had their PhDs in functional programming languages….
… so you see, when we designed XQuery, there were so many people in the group who believed "functional is good".
And I hope we were right ! :-)
====
P.S. SQL is not and has never been functional.
HTH, best regards,
Dana
High time to learn a little German, don't you think so?
Keep cool, only a couple of words for today, and for a long time. They are Wort and Wert.
Wort - word
Wert - value
Notice how a slight shift of vowel turns word into value and turns value into word, and remember that in the beginning was the Word.
An expression is a shape which can be resolved to a value, and XQuery is a pure expression language. I wonder if there is another programming language which is so headstrong, so determined in being an expression language and nothing else. But the XQuery concept of a value is merged with the concept of a resource and its contents in an unprecedented and unparalled way. XQuery allows us to think of resources and resource contents - the contents selected from any number of resources with any degree of sophistication - as values. In XQuery resources and resource content selections are values, indivisible and meaningful like words, basic building blocks of thought. In the beginning was the Word, and in our humble trade we should be aware of the XQuery way of thought: in the beginning was the value.