The syntax makes nested function calls more readable, as it is easy to see if parentheses are balanced.
=String Constructor=
The string constructor has been inspired by [https://en.wikipedia.org/wiki/Here_document here document] literals of the Unix shell and various script languages. It allows you to generate strings that contain various characters that would otherwise be interpreted as XQuery delimiters.
The string constructors syntax uses two backticks and a square bracket for opening and closing a string:
<pre class="brush:xquery">
(: Returns "The new syntax is 'very' flexible!" :)
``["The new syntax is 'very' flexible!"]``
</pre>
XQuery expressions can be embedded via backticks and a curly bracket. The evaluated results will be separated with spaces, and all strings will eventually be concatenated:
<pre class="brush:xquery">
(: Returns »Count 1 2 3, and I will be there.« :)
let $c := 1 to 3
return ``[»Count `{ $c }`, and I will be there.«]``</pre>
=Serialization=