Thanks Christian, I feared as much ;-( I understand the reasoning (processing efficiency and compatibility with parse-json) but find it unfortunate that backwards compatibility wasn't part of the reasoning as maps and map:merge are not exactly new.
--Marc
On Mon, Oct 31, 2016 at 1:50 PM, Christian GrĂ¼n christian.gruen@gmail.com wrote:
Hi Marc,
The reason is why this was decided by the W3C; see [1] and related comments.
Sorry for that, Christian
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=29723
On Mon, Oct 31, 2016 at 1:43 PM, Marc van Grootel marc.van.grootel@gmail.com wrote:
Hi,
Any reason why the deault semantics for map:merge in 8.6 changed in a backwards incompatible manner? Is this because of some XQuery/XPath spec thing? A while ago I switched to 8.6-SNAPSHOT just to be on the latest and greatest and I starting seeing weird things in my code. Initially I didn't bother to look at the docs as I didn't expect map:merge to have changed. At some point I even thought map:merge was broken in this snapshot. I often use map:merge for handling function options and I add the defaults first and then user options. With 8.6 this default behaviour has changed and I would have to switch this around or explicitly ask for 'use-last'. I can do but only by adding map { 'duplicates': 'use-last' }. This means I will have code <= 8.5 and I need to have different code for > 8.5. Was this intentional? If not then I would vote for re-instating default behaviour (use-last).
Cheers, --Marc