Re: Function naming: Problems and proposed solution

> 
> Reads well. I assume the space after the colon would need to be made
> mandatory, as the following expression is syntactically valid:
> 
>  declare namespace method = 'xyz';
>  serialize(1, method:path-with-single-step)

Yes, we already have the same constraint in a map constructor, though it's less noticeable there because most of the time, the key values will be written as string literals in quotes. Conversely, it's likely that with the new syntax, the supplied value will usually be a literal - which eliminates the need for the space except with booleans, e,g, indent:true().

I wanted to use ":=" in map constructors, to avoid the space problem, but I lost the argument. We could still use it in function calls if we chose; it's already used in "let" expressions, after all.

Michael Kay
Saxonica

Received on Wednesday, 2 December 2020 11:19:32 UTC