Hacker News new | ask | show | jobs
by TekMol 2037 days ago
It is not more powerful. You cannot do this for example:

    function hello($name='Joe',$title='dear')
    {
        echo "Hello $title $name";
    }
    hello('Sue');
Try here: https://3v4l.org/6MZHh

With your object properties approach, you always have to use the variable "names".

1 comments

Mixing implicit positional and named parameters is a misfeature. The named parameters should have a distinct syntax like other systems do, e.g. :$ twigil.