> On Mar 10, 2020, at 7:53 AM, Aleksander Machniak <a...@alec.pl> wrote:
> 
> On 10.03.2020 12:43, Mike Schinkel wrote:
>>>> Alternately, why not use this (which is probably the best option IMO)?:
>>>> 
>>>> function foo() attributes
>>>>       SingleArgument("Hello"),
>>>>       Another\SingleArgument("World"),
>>>>       \My\Attributes\FewArguments("foo", "bar") {}
>>>> 
>>> 
>>> This particular example leads to complications with how different keywords
>>> stack up; would the return statement come before the "attributes" keyword?
>> 
>> How does the return statement affect this example?  The return statement 
>> would be inside the braces, the attributes would be before the braces.
> 
> I think he meant return type declaration. That's why the question about
> the `use` clause is as well relevant.


If that is the case that makes a little more sense.  

But even so, the question is surprising because we have a well established 
existing pattern with extends and implements clauses, for example:

function foo():returntype 
        extends Parent 
        implements Interface1, Interface2, Interface2 
        attributes Attribute1, Attribute2, Attribute3 {}

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

Reply via email to