Re: [PHP-DEV] [RFC] Interface Default Methods

2023-06-16 Thread Levi Morrison
On Thu, Jun 15, 2023 at 5:41 PM Levi Morrison via internals wrote: > > On Thu, Jun 15, 2023 at 3:37 PM Ilija Tovilo wrote: > > > I am moving my RFC for interface default methods to discussion: > > > https://wiki.php.net/rfc/interface-default-methods. > > > > The RFC doesn't mention default

Re: [PHP-DEV] [RFC] Interface Default Methods

2023-06-16 Thread Levi Morrison via internals
On Fri, Jun 16, 2023 at 11:51 AM Deleu wrote: > > > On Thu, Jun 15, 2023 at 12:48 AM Levi Morrison via internals > wrote: >> >> Hello, PHP Internals, >> >> I am moving my RFC for interface default methods to discussion: >> https://wiki.php.net/rfc/interface-default-methods. >> >> This can be a

[PHP-DEV] Expression code blocks

2023-06-16 Thread Andreas Hennings
Hello list, I don't know if something like this was already proposed in the past, I did not find anything. Sometimes it would be nice to have a code block inside an expression, like this: public function f(string $key) { return $this->cache[$key] ??= { // Calculate a value for $key.

Re: [PHP-DEV] [RFC] Interface Default Methods

2023-06-16 Thread Deleu
On Thu, Jun 15, 2023 at 12:48 AM Levi Morrison via internals < internals@lists.php.net> wrote: > Hello, PHP Internals, > > I am moving my RFC for interface default methods to discussion: > https://wiki.php.net/rfc/interface-default-methods. > > This can be a useful tool for a few reasons: > 1.

Re: [PHP-DEV] [RFC] Interface Default Methods

2023-06-16 Thread Larry Garfield
On Thu, Jun 15, 2023, at 3:47 AM, Levi Morrison via internals wrote: > Hello, PHP Internals, > > I am moving my RFC for interface default methods to discussion: > https://wiki.php.net/rfc/interface-default-methods. > > This can be a useful tool for a few reasons: > 1. It can make implementing an

Re: [PHP-DEV] Possible RFC: PDOStatement::addBatch

2023-06-16 Thread Vinicius Dias
> Hi Vinicius, > > What would be the reason to add this? A reason cannot just be that there is > no such function. You can easily do it with a loop like you have just shown. > There isn't really any other way > unless we introduce some driver specific > SQL builder. So what would we gain from