Re: [PHP-DEV] Make sorting stable

2020-03-10 Thread Stanislav Malyshev
Hi! > Given that we have internal classes which deliberately have such > comparison behavior (i.e. returning 0 or 1, to signal that there is no > order defined), e.g. Closures[1], I tend to prefer raising a warning > instead of trying to recover. I think there weirdness is because equality and co

Re: [PHP-DEV] OSI approval for PHP 3.01 license

2020-03-10 Thread Stanislav Malyshev
Hi! > Bump. Anyone? > > If there are no objections, can someone go ahead and merge this? I merged it. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Idea for RFC: Compact Object Property Assignment

2020-03-10 Thread Christoph M. Becker
On 10.03.2020 at 21:38, Jakob Givoni wrote: > As mentioned, I'm working on the RFC "Compact Object Property Assignment", > and I'd like to request some RFC karma for my wiki account in order to > create the page: > > Username: jgivoni > Email: ja...@givoni.dk RFC karma granted. :) -- Christoph M

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Benjamin Eberlei
On Tue, Mar 10, 2020 at 9:41 PM Mike Schinkel wrote: > > On Mar 10, 2020 at 3:49 PM, > > wrote: > > On Tue, Mar 10, 2020 at 5:30 PM Mike Schinkel wrote: > >> > On Mar 10, 2020, at 11:28 AM, Benjamin Eberlei >> wrote: >> > >> > Just to make sure you don't run in circles in this discussion thread

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> > On Mar 10, 2020 at 3:49 PM, mailto:kont...@beberlei.de)> > wrote: > > > > > > On Tue, Mar 10, 2020 at 5:30 PM Mike Schinkel (mailto:m...@newclarity.net)> wrote: > > > > On Mar 10, 2020, at 11:28 AM, Benjamin Eberlei > (mailto:kont...@beberlei.de)> wro

Re: [PHP-DEV] Idea for RFC: Compact Object Property Assignment

2020-03-10 Thread Jakob Givoni
Hi again, As mentioned, I'm working on the RFC "Compact Object Property Assignment", and I'd like to request some RFC karma for my wiki account in order to create the page: Username: jgivoni Email: ja...@givoni.dk Thanks, Jakob -- PHP Internals - PHP Runtime Development Mailing List To unsubsc

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Benjamin Eberlei
On Tue, Mar 10, 2020 at 5:30 PM Mike Schinkel wrote: > > On Mar 10, 2020, at 11:28 AM, Benjamin Eberlei > wrote: > > > > Just to make sure you don't run in circles in this discussion thread > here, even when syntax is not fixed yet, it's not going to be a syntax > where the attributes are suffix

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Rowan Tommins
Hi Mike, You're right that we're bikeshedding rather, but to clarify a couple of small points, and apologise on some others... On Tue, 10 Mar 2020 at 16:27, Mike Schinkel wrote: > > Saying it is a weak argument is merely opinion. > You are right, that was an unhelpful comment, and I apologis

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Ben Ramsey
> On Mar 10, 2020, at 05:54, Rowan Tommins wrote: > > On Tue, 10 Mar 2020 at 01:02, Mike Schinkel wrote: > >> >> I find angle brackets extremely hard to read >> > > > You're definitely not alone in disliking the syntax, but I think it > actually looks quite neat. It reminds me firstly of te

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> On Mar 10, 2020, at 11:28 AM, Benjamin Eberlei wrote: > > Just to make sure you don't run in circles in this discussion thread here, > even when syntax is not fixed yet, it's not going to be a syntax where the > attributes are suffixed after the declaration. It would maybe some other > chara

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> On Mar 10, 2020, at 8:33 AM, Rowan Tommins wrote: You make it really hard to just let the discussion just stand. >> Consistency with other declarations in PHP? > > I think this is generally a weak argument, because we have a mixture of > punctuation and keywords already. Saying it is a weak

Re: [PHP-DEV] [VOTE] Object-based token_get_all() alternative

2020-03-10 Thread Côme Chilliet
Le mardi 10 mars 2020, 15:53:41 CET Nikita Popov a écrit : > Would __toString() return $token->text? I'm not strictly opposed to this, > but I'd be hard pressed to think of a situation where I would prefer > writing (string) $token over $token->text. Generally, the less magic the > better :) My id

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Benjamin Eberlei
On Tue, Mar 10, 2020 at 4:04 PM Mike Schinkel wrote: > > On Mar 10, 2020, at 7:53 AM, Aleksander Machniak wrote: > > > > On 10.03.2020 12:43, Mike Schinkel wrote: > Alternately, why not use this (which is probably the best option > IMO)?: > > function foo() attributes >

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Rowan Tommins
On Tue, 10 Mar 2020 at 15:04, Mike Schinkel wrote: > > I think he meant return type declaration. That's why the question about > > the `use` clause is as well relevant. > Yes, that was a typo on my part, sorry. > But even so, the question is surprising because we have a well established > ex

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> On Mar 10, 2020, at 7:53 AM, Aleksander Machniak wrote: > > On 10.03.2020 12:43, Mike Schinkel wrote: Alternately, why not use this (which is probably the best option IMO)?: function foo() attributes SingleArgument("Hello"), Another\SingleArgument("World"),

Re: [PHP-DEV] [VOTE] Object-based token_get_all() alternative

2020-03-10 Thread Nikita Popov
On Tue, Mar 10, 2020 at 12:36 PM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Hello, > > I know I’m late, but shouldn't these tokens have a __toString() method? > It’s not listed in rejected features. > Would __toString() return $token->text? I'm not strictly opposed to this, but I

Re: [PHP-DEV] OSI approval for PHP 3.01 license

2020-03-10 Thread Ben Ramsey
> On Mar 6, 2020, at 15:42, Ben Ramsey wrote: > >> On Mar 5, 2020, at 23:42, Ben Ramsey wrote: >> >> I’ve just opened a pull request on web-php that should help the legacy >> approval process. See this post: >> http://lists.opensource.org/pipermail/license-review_lists.opensource.org/2020-Mar

[PHP-DEV] Fixing fetch mode for object property access (SimpleXML auto-vivification breakage)

2020-03-10 Thread Nikita Popov
Hi internals, While reviewing the RFC for read-only properties, I encountered the following long-standing issue once again: $foo->bar->baz = 42; should be the same as $bar = $foo->bar; $bar->baz = 42; but isn't, because the "$foo->bar" is compiled as write-fetch rather than read-fe

Re: [PHP-DEV] OSI approval for PHP 3.01 license

2020-03-10 Thread Ben Ramsey
> On Mar 10, 2020, at 09:11, Johannes Schlüter wrote: > > On Wed, 2020-03-04 at 10:33 +0100, Andreas Heigl wrote: >> Does anyone here remember why the changes to the license where done >> in >> the first place? The commit was done on the 1st of Jan. 2006 (at >> least >> according to >> > https:/

Re: [PHP-DEV] Re: OSI approval for PHP 3.01 license

2020-03-10 Thread Johannes Schlüter
On Wed, 2020-03-04 at 10:33 +0100, Andreas Heigl wrote: > Does anyone here remember why the changes to the license where done > in > the first place? The commit was done on the 1st of Jan. 2006 (at > least > according to > https://github.com/php/php-src/commit/56567d31b331d3ab7814b36867579116eb14d

Re: [PHP-DEV] Windows snapshot builds switching to debug

2020-03-10 Thread Anatol Belski
Hi Christoph, I'd see not much value in switching to debug builds for the snapshots. Currently the snapshots are public and are built with PGO. This makes it easy for users to test any provided revision. Debug builds are better suitable for the runtime development, but they require a debug runtime

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Rowan Tommins
On Tue, 10 Mar 2020 at 11:46, Mike Schinkel wrote: > > On Mar 10, 2020, at 7:36 AM, Rowan Tommins > wrote: > > I think that applies to our case equally: any punctuation or keyword is > > just a separator between the main function declaration and the specific > > attribute being applied. Having t

Re: [PHP-DEV] Re: [RFC] Attributes v2

2020-03-10 Thread Michał Brzuchalski
pon., 9 mar 2020 o 15:45 Benjamin Eberlei napisał(a): > On Mon, Mar 9, 2020 at 3:42 PM Benjamin Eberlei > wrote: > > > Hi all, > > > > I want to resurrect Dmitrys Attributes RFC that was rejected for 7.1 in > > 2016 with a few changes, incorporating feedback from the mailing list > back > > then

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Aleksander Machniak
On 10.03.2020 12:43, Mike Schinkel wrote: >>> Alternately, why not use this (which is probably the best option IMO)?: >>> >>> function foo() attributes >>>SingleArgument("Hello"), >>>Another\SingleArgument("World"), >>>\My\Attributes\FewArguments("foo", "bar") {} >>> >> >> T

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> On Mar 10, 2020, at 7:36 AM, Rowan Tommins wrote: > I think that applies to our case equally: any punctuation or keyword is > just a separator between the main function declaration and the specific > attribute being applied. Having to write "attribute Sealed" would be like > having to write "vis

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Mike Schinkel
> On Mar 10, 2020, at 6:54 AM, Rowan Tommins wrote: >> and fear — have trained many newbies in programming — that it will cause >> newbies who see PHP to think it is too complex for them to consider >> learning. > > I think the *concept* of attributes carries a much higher risk of that than > any

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Rowan Tommins
On Tue, 10 Mar 2020 at 10:54, Rowan Tommins wrote: > > C#: [Foo] > Rust: #![Foo] or #[Foo] > C++: [[Foo]] > Java: @Foo > ECMAScript (proposed): @Foo > Go: `Foo` or "Foo" > Doctrine et al: /** @Foo */ > Hack: <> > > To add to that list, Python decorators, which serve a similar purpose, also use @

Re: [PHP-DEV] [VOTE] Object-based token_get_all() alternative

2020-03-10 Thread Côme Chilliet
Hello, I know I’m late, but shouldn't these tokens have a __toString() method? It’s not listed in rejected features. -- Côme Chilliet FusionDirectory - https://www.fusiondirectory.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Attributes v2

2020-03-10 Thread Rowan Tommins
On Tue, 10 Mar 2020 at 01:02, Mike Schinkel wrote: > > I find angle brackets extremely hard to read > You're definitely not alone in disliking the syntax, but I think it actually looks quite neat. It reminds me firstly of templating languages which use {{foo}} for placeholders and/or keywords,