From a first glance it seems to me that allowing default values for arguments (aka keyword arguments or optional arguments) clashes with our ability to define function overloads having fewer arguments.
Please, prove me wrong.
Thanks,
Dimitre
Sent from my iPhone
> On Dec 2, 2020, at 8:07 AM, Michael Kay <mike@saxonica.com> wrote:
>
>
>
>> On 2 Dec 2020, at 11:27, Tom Hillman <tom@expertml.com> wrote:
>>
>> serialize($x, method: 'json', indent: true())
>>
>
> I've had a go at speccing this up: see https://htmlpreview.github.io/?https://github.com/qt4cg/qtspecs/blob/master/specifications/xquery-40/html/xpath-40-diff.html
>
> Search for "keyword arguments".
>
> I'm liking it.
>
> (I used ":=" rather than ":" as the punctuation, but it's easily changed)
>
> There's a bug in the grammar -- it allows f( , a:= 3 ) -- but hey, it's a first draft.
>
> Michael Kay
> Saxonica
>