Re: Keyword arguments [was fn:slice]

On Sat, Dec 5, 2020 at 3:58 PM Dimitre Novatchev <dnovatchev@gmail.com>
wrote:
.  .  .

> So, we can define a one-argument function overload and call it explicitly
> as:
>
>     myFunction#1(/*/name)
>
> and / or have the different call:
>
>    myFunction#3(?, 15, "Hi")(/*/name)
>
> or, this can be  abbreviated:
>
>      myFunction#3(?)(/*/name)
>

The abbreviation is:

      myFunction#3(/*/name)


>
> Thanks,
> Dimitre
>
> And I was thinking it purely as a better way of declaring a family of
>> functions, not as something linked to changes in function call syntax.
>>
>>
>> "*You can also use named arguments instead of positional arguments when
>> invoking a method. When using named arguments, you specify the parameter
>> name followed by a colon (":") and the argument. Arguments to the method
>> can appear in any order, as long as all required arguments are present. *
>> "
>>
>>
>> The main challenge is defining rules for unambiguously binding a function
>> call to a declared function when there are several declared functions with
>> the same name. This needs to handle both binding of static function calls
>> and dynamic references.
>>
>> Another detail, particularly for XSLT, is defining the rules for
>> overriding of functions in other packages.
>>
>> Michael Kay
>> Saxonica
>>
>>
>
>

-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

Received on Sunday, 6 December 2020 00:03:10 UTC