Re: [PHP-DEV] Re: [RFC] Amendments to Attributes

2020-06-04 Thread guilhermebla...@gmail.com
Hi Benjamin, Overall, all these amendments are good in my opinion, but I'd like to challenge a few things: 1- On item 3, the acceptable targets would be: class, function, method, property, class constant, parameter or all. If possible, I'd like to ask if it's possible to expand this list and also

RE : [PHP-DEV] RFC proposal: Spread Operator for Array Destructuring Assignment

2020-06-04 Thread paul laffitte
Well, I think this answer the first question. Since consistency is king, why not just applying the same behavior than without spread operator? What do you think ? De : Côme Chilliet Envoyé le :mercredi 3 juin 2020 17:02 À : internals@lists.php.net

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Theodore Brown
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

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Theodore Brown
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 i

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Marcio Almada
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

Re: [PHP-DEV] Re: [RFC] Amendments to Attributes

2020-06-04 Thread Benjamin Eberlei
On Thu, Jun 4, 2020 at 12:54 PM Benas IML wrote: > Thank you for the update! Given that there is still an open issue, is the > RFC proposing flags or a separate `<>` attribute? > Good point, we came to the conclusion to simplify. Should attributes be in the global namespace, then we shouldn't ar

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Rowan Tommins
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 to

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Ben Ramsey
> 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 `<<>>`

RE: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Iván Arias
>> As we are creating new syntax, why not simply use another single >> symbol? Here are some examples: >> >> ```php >> *Deprecated >> %Deprecated >> >Deprecated >> &Deprecated >> function foo() { } >> ``` >> >> I'm not 100% sure if all this symbols could by used in that context, >> but I think I pr

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Theodore Brown
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 che

Re: [PHP-DEV] RFC proposal: fsync support for file resources

2020-06-04 Thread David Gebler
It's interesting that you mention fdatasync - perhaps a better C programmer than I am can correct me, but I don't think it has an equivalent on Windows, where _commit() is a wrap on FlushFileBuffers API. So in respect of PHP implementation, the options would be: fdatasync() is not available on Win

Re: [PHP-DEV] [RFC] Add CMS Support

2020-06-04 Thread Eliot Lear
Hi everyone, Following up on this work, I am pleased to say that the code is stable and code complete.  In discussions with this group and various maintainers, it seems that people don't see the need for a VOTE on this work.  Therefore, unless there is an objection, I will work with the maintainer

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Theodore Brown
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 > &Deprecated > function foo() { } > ``` > > I'm not 100% sure if all this symbols co

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Theodore Brown
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 `//`

[PHP-DEV] Re: [RFC][VOTE] PHP Namespace in core

2020-06-04 Thread Michał Brzuchalski
śr., 3 cze 2020 o 09:49 Michał Brzuchalski napisał(a): > pt., 22 maj 2020 o 08:14 Michał Brzuchalski > napisał(a): > >> Hi Internals, >> >> We have just opened the vote on the PHP namespace in core RFC. The voting >> will be >> open for two weeks, until 2020-06-05 06:00 UTC. >> > > Heads-up. We

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Jordi Boggiano
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. htt

Re: [PHP-DEV] [RFC] Nullsafe operator

2020-06-04 Thread Ryan Jentzsch
BIG THUMBS UP for this feature. As was mentioned that TypeScript uses this and saves developers lots of time by avoiding nested null checking. I suggest in the RFC including a list of other languages that have this feature. On Tue, Jun 2, 2020, 2:53 PM Ilija Tovilo wrote: > Hi internals > > I'd

Re: [PHP-DEV] Re: [RFC] Amendments to Attributes

2020-06-04 Thread Benas IML
Thank you for the update! Given that there is still an open issue, is the RFC proposing flags or a separate `<>` attribute? Best regards, Benas On Thu, Jun 4, 2020, 12:29 PM Benjamin Eberlei wrote: > I have changed back the rename from namespacing to Attributes\Attribute to > using just Attribu

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Benas IML
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 fro

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Iván Arias
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 break

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Ilija Tovilo
> > 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 we

Re: [PHP-DEV] [RFC] Nullsafe operator

2020-06-04 Thread Peter Stalman
> Hi internals > > I'd like to introduce another RFC I've been working on: > https://wiki.php.net/rfc/nullsafe_operator > > It introduces the nullsafe operator ?-> that skips null values when > calling functions and fetching properties. In contrast to the last few > attempts this RFC includes full

[PHP-DEV] Re: [RFC] Amendments to Attributes

2020-06-04 Thread Benjamin Eberlei
I have changed back the rename from namespacing to Attributes\Attribute to using just Attribute after a few discussions off list. The reasoning is that it becomes more clear that a majority of core contributors strongly prefers using the global namespace as the PHP namespace and opening up this poi

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Benas IML
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: > > > https://wiki.php.net/rfc/shorter_attribute_synt

Re: [PHP-DEV] [RFC] Shorter attribute syntax

2020-06-04 Thread Peter Bowyer
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 C