Re: Named Parameters

From: Date: Sat, 03 Apr 2010 23:59:29 +0000
Subject: Re: Named Parameters
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-47771@lists.php.net to get a copy of this message
I really doubt named parameters would have much of an impact on anything, but I'd be willing to consider it if a clean implementation was to show up.
I think they'd allow to manage complex parameter sets more efficiently than with those $options arrays. But that'd probably require changing the way how parameters are passed, since the stack won't work too good anymore for it.
Is the desire for named parameters to only have it for user land function/methods? If so, I am kind of -.5 on this because that would be a little WTF for a new user. If not, then it is a huge undertaking as every internal function and pecl extension would have to be updated to support them. In which case it is a ton of work. I have long ago started passing arrays and doing validation myself, which sucks. I admit, named parameters + scalar type hints would be quite nice and simplify a lot of my code. Brian.

« previous php.internals (#47771) next »