In the case whereby names parameters are "plucked" from the argument
list and passed as a hash to the function it really shouldn't matter
whether that's invalid in python; both (2, 'name' => 'test') and
('name' => 'test', 2) would yield the same results, albeit it's a
highly dubious way of passing arguments ;-)

On 4/7/10, Martin Jansen <mar...@divbyzero.net> wrote:
> On 5.4.2010 00:45, Pierre Joye wrote:
>> On Mon, Apr 5, 2010 at 12:07 AM, Stanislav Malyshev <s...@zend.com> wrote:
>>
>>> 3. Combining named and un-named params can get weird - i.e. foo(1,2,3) is
>>> simple, foo(1, 2, bar => 3) is doable, but foo(1, 2, bar => 3, 4) would
>>> be
>>> trouble, since it is not clear at all where 4 should go to. Moreover,
>>
>> If we introduce named argument, mixing them should not be weird. An
>> argument can have both a name and a position, allowing combination of
>> normal or named arguments. Python's way to do it is very nice and
>> handy:
>>
>> http://diveintopython.org/power_of_introspection/optional_arguments.html
>
> Just to be clear about this:  Python does not allow using an unnamed
> parameter after a named parameter occurred, i.e. foo(bar = 3, 2) is not
> valid there.
>
> I would go as far as disallowing mixing of named and unnamed parameters
> completely.  But that's probably just me.
>
> - Martin
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
--
Tjerk

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to