Named parameter in the same way that goto does, with labels. A labeled parameter... But there always some drawbacks... such as mix named and conventional parameters. I think that you just chose one way and use, not allowing mix these two ways.
<?php goto a; echo 'Foo'; a: echo 'Bar'; ?> I also think that should exists a strict way to write code, something like error_reporting, but to ensure a specific way to write code, gaining speed in the whole compilation thing. strict_code_standard = K&R strict_code_standard = GNU strict_code_standard = PEAR strict_code_standard = ZEND The GO land does it in some way On Sun, May 27, 2012 at 7:03 PM, Daniel Macedo <admac...@gmail.com> wrote: > > NOTE: Although related/solving some of the same problems; skipping optional parameters (several commas or using 'default' keyword) is different from using named parameters. > And both have different supporters/haters over each change. > > I wouldn't like to restart the whole debate over the KISS, "Not the PHP way", or the alternate ways work around the original issue. > > But on a personal opinion, I'd like to see named parameters implemented - which also solves the skipping optionals regardless of the order - the only concern of the community at large might be the proper syntax.. > > I also suggested the even shorter array syntax for 5.4: http://php.net/migration54.new-features > Which would use the colon as a separator > $a = ['one': 1, 'two': 2, 'three': 3, 'four': 4]; > > And the idea it would be simpler/efficient/readable inspired some dissent over both the readability and the PHP-way. > > So I'm not sure if your suggestion won't keep the same issue... -- Mathias Grimm