On Tue, 4 Aug 2020, Theodore Brown wrote:

> 
>     #[Attr1, Attr2] # 15 chars
> 
>     @@Attr1 @@Attr2 # 15 chars
> 
>     # 4 lines, 53 chars not counting whitespace
>     @[
>         AttrWithParam("foobar"),
>         SomeOtherAttr("fizzbuzz"),
>     ]
> 
>     # 2 lines, 52 chars
>     @@AttrWithParam("foobar")
>     @@SomeOtherAttr("fizzbuzz")

Shall I do one where we count pixels? Because @@ is using a lot more of 
them... And there is also no reason why it can't be just:

    @[AttrWithParam("foobar")]
    @[SomeOtherAttr("fizzbuzz")]

Although group is allowed, it doesn't mean it's always useful to do.

    @@Attr1 @@Attr2 

Seems to me like a cat had trespassed on your keyboard, the *heavy* @@ 
also dominates the line.

> I agree that we want the best syntax, not necessarily the best 
> **looking** syntax. I still believe that the @@ syntax offers the best 
> balance here.

>From the RFC:
- No ending delimiter
- Doesn't allow grouping
- No forwards compat with PHP 7
- Not used ny another language

And the "familiar with docblocks" is quite a stretch, as that doesn't 
use @@ either. I've only included it because it would be unfair if @@ 
had nothing positive going for it.

cheers,
Derick

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

Reply via email to