Hi Theodore,
On 08.06.20 06:36, Theodore Brown wrote:
```php
// 170 characters for attributes (162 not counting leading whitespace)
<<
ManyToMany(Phonenumber::class),
JoinTable("users_phonenumbers"),
JoinColumn("user_id", "id"),
InverseJoinColumn("phonenumber_id", "id",
On Sun, Jun 7, 2020, at 11:36 PM, Theodore Brown wrote:
> > Bracket-based syntaxes, particularly with grouping, are more clearly
> > separated from the main code, particularly when used inline. For instance:
> >
> > `$f = @@Something @@AnotherThing function(@@Special @@ReallyInt int $var)
> >
Hi Rowan,
On Sun, June 7, 2020 at 5:32 PM Rowan Tommins wrote:
> On 07/06/2020 19:37, Theodore Brown wrote:
> > Yes, I agree that there's a judgment call to make. Out of curiosity,
> > given these shortcomings of the double-angle-bracket syntax, do you
> > think there are any objective reasons
On 07/06/2020 19:37, Theodore Brown wrote:
If `<> )>>` means something like `new Foo( new Bar )`, then I
can imagine it being useful for `<> )>>` to mean
`new Foo( [new Bar, new Baz] )`. That would actually be more convenient than
the double-at version, where you'd have to write `@@Foo( [@@Bar,
Hi Rowan,
On Sat, June 6, 2020 at 7:06 AM Rowan Tommins wrote:
> The `::` token in the parser is called `T_PAAMAYIM_NEKUDOTAYIM`, and
> personally I find `T_SL` and `T_SR` just as cryptic and irrelevant. The most
> common place I see those token names is when accidentally running code
> with
Hi Theodore,
Firstly, sorry if my previous e-mail came across overly negative, I
wasn't in the best mood when I wrote it (gestures vaguely at the state
of the world).
I think this is possibly the best line I've read all week:
Well, I guess the line between objective and subjective may
On Thu, June 4, 2020 at 12:19 PM Rowan Tommins wrote:
> Hi Theodore,
Hi Rowan,
Thanks for the feedback. I added replies inline.
> I find the "objective" reasons in this RFC to be greatly exaggerated.
>
> 1. `@@Jit` does not require "half as many characters" as `<>`;
> even for this, which is
On Thu, June 4, 2020 at 3:28 PM Marcio Almada wrote:
> I'd also prefer any attribute syntax without the bracket-like pair
> of tokens. I'm just a bit confused about the RFC itself and the PR
> content at this point.
>
> The RFC is currently proposing `@@MyAttribute()` and the PR
> is currently
Hello!
>
> Hi internals,
>
> I discussed the syntax for attributes further with Benjamin, Martin,
> and several other internals developers off-list, and with their
> feedback completed an RFC proposing to use the shorter `@@` syntax
> instead of `<<>>` for attributes in PHP 8.
I'd also prefer any
On Thu, 4 Jun 2020 at 00:55, Theodore Brown wrote:
> https://wiki.php.net/rfc/shorter_attribute_syntax
>
> The goal is not to bikeshed over subjective syntax preferences,
> but to address several concrete shortcomings related to verbosity,
> nested attributes, confusion with generics and other
> On Jun 3, 2020, at 18:54, Theodore Brown wrote:
>
> Hi internals,
>
> I discussed the syntax for attributes further with Benjamin, Martin,
> and several other internals developers off-list, and with their
> feedback completed an RFC proposing to use the shorter `@@` syntax
> instead of `<<>>`
>> As we are creating new syntax, why not simply use another single
>> symbol? Here are some examples:
>>
>> ```php
>> *Deprecated
>> %Deprecated
>> >Deprecated
>>
>> function foo() { }
>> ```
>>
>> I'm not 100% sure if all this symbols could by used in that context,
>> but I think I prefer any
On Thu, June 4, 2020 at 6:55 AM Jordi Boggiano wrote:
> Thanks for the write-up. I didn't feel strongly either way before but
> after reading the RFC I am hoping it passes.
>
> Another fringe benefit is the ability to grep for attributes, @@ does
> not occur anywhere in a couple projects I
On Thu, June 4, 2020 at 5:39 AM Iván Arias wrote:
> As we are creating new syntax, why not simply use another single
> symbol? Here are some examples:
>
> ```php
> *Deprecated
> %Deprecated
> >Deprecated
>
> function foo() { }
> ```
>
> I'm not 100% sure if all this symbols could by
On Thu, June 4, 2020 at 5:37 AM Ilija Tovilo wrote:
>>> Does the PHP parser prevent us from adopting #[attr]? I presume
>>> C#'s [attr] syntax and C++'s [[attr]] are impossible due to
>>> PHP's short array syntax.
>>
>> yes, that would create ambiguity in the parser since `#` (just
>> like
Hey,
On 04/06/2020 01:54, Theodore Brown wrote:
I discussed the syntax for attributes further with Benjamin, Martin,
and several other internals developers off-list, and with their
feedback completed an RFC proposing to use the shorter `@@` syntax
instead of `<<>>` for attributes in PHP 8.
Hey!
That's why I am against this RFC or any other "change style to what I
prefer". PHP's current attribute syntax is consistent with other languages
and poses no BC breaks whatsoever.
Best regards,
Benas
On Thu, Jun 4, 2020, 1:37 PM Ilija Tovilo wrote:
> > > Does the PHP parser prevent us
Hi all,
I understand that is better to replicate syntax from another language, but the
only valid syntax seems to be the current one (Hack's <<>>).
The proposed syntax in this RFC is a new syntax that is not directly used in
another language, but an adaptation, and it includes a little BC
> > Does the PHP parser prevent us from adopting #[attr]? I presume C#'s [attr]
> > syntax and C++'s [[attr]] are impossible due to PHP's short array syntax.
>
> yes, that would create ambiguity in the parser since `#` (just like `//`)
> is for comments.
I've mentioned this off-list before. If
Hello,
yes, that would create ambiguity in the parser since `#` (just like `//`)
is for comments.
Best regards,
Benas
On Thu, Jun 4, 2020, 11:03 AM Peter Bowyer
wrote:
> Hi Theodore,
>
> On Thu, 4 Jun 2020 at 00:55, Theodore Brown
> wrote:
>
> >
Hi Theodore,
On Thu, 4 Jun 2020 at 00:55, Theodore Brown wrote:
> https://wiki.php.net/rfc/shorter_attribute_syntax
Thanks for creating this RFC and for including "Comparison to other
languages" in it. A provisional +1 from me.
Does the PHP parser prevent us from adopting #[attr]? I presume
Hello,
thank you for the RFC but I hope it doesn't pass. Here's my constructive
feedback as to why.
Verbosity? Are we really debating whether adding 2 extra characters is more
"verbose"? Well, with 3 or more grouped attributes, we are less verbose by 1
character. I don't find "verbosity" to be
On Thu, Jun 4, 2020 at 1:55 AM Theodore Brown
wrote:
> Hi internals,
>
> I discussed the syntax for attributes further with Benjamin, Martin,
> and several other internals developers off-list, and with their
> feedback completed an RFC proposing to use the shorter `@@` syntax
> instead of `<<>>`
Hi internals,
I discussed the syntax for attributes further with Benjamin, Martin,
and several other internals developers off-list, and with their
feedback completed an RFC proposing to use the shorter `@@` syntax
instead of `<<>>` for attributes in PHP 8.
101 - 124 of 124 matches
Mail list logo