Alexandru Popescu ☀ schrieb:
> On 10/10/07, Aaron Digulla <
digulla@...> wrote:
>> Quoting Alexandru Popescu ☀ <
the.mindstorm.mailinglist@...>:
>>
>>> On 10/9/07, Guillaume Laforge <
glaforge@...> wrote:
>>>> Is there some reason (use case?) which triggered this idea?
>>>> Frankly, I'm not too fond of mixing maps and parameters too much.
>>>>
>>> Python supports the following format:
>>>
>>> positional arguments
>>> *args:
>>> **args: named parameters
>>>
>>> This seems to work oke there. But I don't think that mixing them makes sense.
>
> That was exactly my point. The initial Groovy example was not under
> fixed ordering rules, and I have argumented that we should use a fixed
> order rule if we want to support this feature.
we already have one. named arguments are in a map in the first argument,
additional positional arguments can be used by a vargs part...
for example
def foo(named=[:], arg1, arg2, Object.. args) {}
well it is working only locally , because Groovy seems to have a little
problem that I have to fix first.. but anyway, that is how it could be used
bye blackdrag
--
Jochen "blackdrag" Theodorou
Groovy Tech Lead (
http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email