Hi David,
> I would like to suggests the syntax "using attribute(Attribute, ...)". It
> is more clear and should not create BC.
I'd agree that it's implementable and works with the tokenizer.
My main objection is the verbosity, which is the reason I assume many other
languages have fairly short/distinct attribute syntax.
```
// Assume Unused tells IDEs/analyzers/linters not to warn about unused
parameters,
// and Override warns about a method not being an override
using attribute(Override)
public function apiMethod(
using attribute(Unused)
array $params,
using attribute(Unused)
bool $featureEnabled,
using attribute(Unused)
array $options,
) {...}
```
- Tyson
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php