Re: [PHP-DEV] [RFC] Adding return types to internal methods (PHP 8)

2021-02-13 Thread Máté Kocsis
Hi Nikita and Nicolas, After a month of pause, I came back to this topic. A concern I have is that for methods with union return types, there > wouldn't be any way to avoid a deprecation warning without having PHP 8 as > the minimum version requirement. And given PHP's general error handling >

Re: [PHP-DEV] Re: Proposal: namespace the SPL

2021-02-13 Thread Levi Morrison via internals
On Sat, Feb 13, 2021 at 10:57 AM Pierre R. wrote: > > Le 13/02/2021 à 18:01, Levi Morrison via internals a écrit : > > You make some good points, Pierre. Here are my main rebuttals: > > > > 1. "Spl" is already the effective namespace for the SPL because > > that's the prefix used by

Re: [PHP-DEV] Re: Proposal: namespace the SPL

2021-02-13 Thread Pierre R.
Le 13/02/2021 à 18:01, Levi Morrison via internals a écrit : You make some good points, Pierre. Here are my main rebuttals: 1. "Spl" is already the effective namespace for the SPL because that's the prefix used by SplFixedArray, SplQueue, spl_classes, and so on. Its namespace has already been

Re: [PHP-DEV] Re: Proposal: namespace the SPL

2021-02-13 Thread Levi Morrison via internals
On Sat, Feb 13, 2021 at 9:25 AM Pierre wrote: > > Le 11/02/2021 à 18:48, Chase Peeler a écrit : > > I think Spl makes sense (there might be a debate over whether it should be > > Spl or SPL though). How feasible is it to create generate a deprecation > > notice when the global version is used? I

Re: [PHP-DEV] Re: Proposal: namespace the SPL

2021-02-13 Thread Pierre
Le 11/02/2021 à 18:48, Chase Peeler a écrit : I think Spl makes sense (there might be a debate over whether it should be Spl or SPL though). How feasible is it to create generate a deprecation notice when the global version is used? I assume the hope is to eventually move away from using those,

Re: [PHP-DEV] Inline conditional that returns null if falsy

2021-02-13 Thread David Rodrigues
Em sáb., 13 de fev. de 2021 às 00:11, Marco Pivetta escreveu: > Hey David, > > Even upfront, this looks like a quite bad idea: either you have an empty > collection, or you have a collection with elements in it, but `null` is a > very different concept that isn't homogeneous with the resulting