I think that verbosity is not a problem if compared to "strange mixed
symbols", mainly to new users. Google it is a bit hard "what means double
at". And "using attribute" is very clear.

Anyway, I think that is valid we use it for now until we have a good symbol
arrangement, and on future we could have the "verbose syntax" ("using
attribute()") and shortened syntax (to be decided, but like "#[...]").

Atenciosamente,
David Rodrigues


Em qui., 30 de jul. de 2020 às 11:09, tyson andre <tysonandre...@hotmail.com>
escreveu:

> 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

Reply via email to