Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-31 Thread Larry Garfield
On Thu, Dec 31, 2020, at 4:02 AM, Michał Marcin Brzuchalski wrote: > Hi Larry, > I really like the shape of the current RFC. > > I'd like to ask a few things: > > 1. Regarding the Scalar Enums since scalar values need to be literal and > by design they're read only why they use a spear "->value"

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-31 Thread Larry Garfield
On Thu, Dec 31, 2020, at 6:53 AM, Rowan Tommins wrote: > On 30/12/2020 21:24, Aleksander Machniak wrote: > > My argument is that, from an end-user perspective, I don't really see > > why Unit and Scalar enums have to have different "API" at this point. > > I'm talking about ":string"/":int" in the

Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals

2020-12-31 Thread Olle Härstedt
2020-12-31 12:37 GMT, Rowan Tommins : > Hi Mike and Olle, > > > On 31/12/2020 00:24, Mike Schinkel wrote: >> A different perspective is that "withX" methods require a mental >> translation where "addX" methods do not, much like how a person whose >> native language is English will find it a challen

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-31 Thread Rowan Tommins
On 30/12/2020 21:24, Aleksander Machniak wrote: My argument is that, from an end-user perspective, I don't really see why Unit and Scalar enums have to have different "API" at this point. I'm talking about ":string"/":int" in the enum definiton as well as ->value and ->from(). My personal opin

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-31 Thread Rowan Tommins
On 30/12/2020 19:47, Larry Garfield wrote: That's partially left over from when we had per-case methods, where grouping would be highly fugly. However, I'm still advocating for tagged unions (in a future step) having per-case methods, and that would make the grouping syntax fugly again. It's

Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals

2020-12-31 Thread Rowan Tommins
Hi Mike and Olle, On 31/12/2020 00:24, Mike Schinkel wrote: A different perspective is that "withX" methods require a mental translation where "addX" methods do not, much like how a person whose native language is English will find it a challenge to (or cannot) "think" in French. I wonder

Re: [PHP-DEV] Mysqli improvements

2020-12-31 Thread Craig Francis
Hi Kamil, I like these proposals, especially error reporting, which I've got caught out with before: https://bugs.php.net/bug.php?id=78932 As to "add bind-in-execute to mysqli", by passing an array of parameters to mysqli_stmt::execute(), this is something I'd really like to see. I just wonder

Re: [PHP-DEV] [RFC] Bundling ext/simdjson into core

2020-12-31 Thread Máté Kocsis
Sorry, I need to add a small correction for my previous email: JsonParser::getKeyValue() wouldn't allow parsing a truncated JSON document. The on-demand parsing API I mentioned in my opening message is what would make such use-case possible. Besides, I accept if you feel it's too early for a new

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-31 Thread Michał Marcin Brzuchalski
Hi Larry, pon., 28 gru 2020 o 21:22 Larry Garfield napisał(a): > Hello, Internalians! > > After considerable discussion and effort, Ilija and I are ready to offer > you round 2 on enumerations. This is in the spirit of the previous > discussion, but based on that discussion a great deal has bee