Hi Rob, to be honest; I don't know. It is part of the XQuery 3.0 spec and I am sure the wise people who have written this spec have a reason to do so. I can think of a number of reasons to always include it: - obviously, you will need it for some functions to identify them , because you could e.g. have two functions with the same name, but different arity. So if you need it for some, it could make sense to make it a requirement for all for consistency - it could be for avoiding errors in the code. Suppose, in your function changes in a nwe version and now needs just one instead of two arguments. With the arity given in a function item, you can detect this at compile time. Without it, it is a runtime issue and potentially much more dangerous. - I guess it is also slightly easier for an implementation to look up the function if the arity is given as well, as it can be a simple hash lookup. Without it, you might need to scan and find the right function. Although, to be honest, I think the overhead is negligible.
But if you really want to know the reasons and not just me thoughts, it might be better to ask on xquery-talk. Cheers, Dirk On 11/21/2014 09:08 AM, Rob Stapper wrote: > Hi Dirk, > > I have to ask this: What is the "fun" of the function-arity to be a part of > its identification. Which means that a property is part of an identification. > > - Rob > > -----Oorspronkelijk bericht----- > Van: Dirk Kirsten [mailto:d...@basex.org] > Verzonden: donderdag 20 november 2014 11:14 > Aan: Rob Stapper > CC: BaseX > Onderwerp: Re: [basex-talk] small issue with map:put() > > Hello Rob, > > I have to admit this error message is not really helpful at all, but you are > missing the arity. It should be > > let $d := $c( $b, map:put#3) > > i.e. you always have to give the artiy of the function if you want to get the > function item. > > Cheers, > Dirk > > On 11/20/2014 11:00 AM, Rob Stapper wrote: > > Hi, > > > > > > > > See attached snippet. > > > > I get the error-message: no context value bound, on this one. > > > > What's going wrong here? > > > > > > > > Rob > > > > > > > > --- > > Dit e-mailbericht bevat geen virussen en malware omdat avast! > > Antivirus-bescherming actief is. > > http://www.avast.com > > > -- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22