2013/8/30 Stas Malyshev <smalys...@sugarcrm.com> > > don't see a reason why one should explicitly disallow doing multiple > > unpacks. > > Because it makes very hard to understand what's going on and makes no > sense semantically. > > > As you can see, here two arguments are unpacked in one call. > > This is very special use case to be hidden in library functions, I don't > think we need to have language syntax specially directed at that, at the > cost of making it overall more complex and hard to understand. I can see > what "add all those params at the end" syntax mean. However having > something like ($a, ...$b, $c, ...$d, $e, $f, $g, ...$h) I have no idea > what's going on at all and what is sent where. > > I agree with Stas here. If an argument comes after an unpacked array, its position is not certain until runtime. This makes life difficult for static analysis tools, which is one of the reasons for introducing the new syntax.
Even in the use case of Nikita, the two arguments to be unpacked come without any standard arguments between or after them. I suggest that argument unpacking should be limited to the last arguments only. Lazare Inepologlou Ingénieur Logiciel -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >