Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread Rowan Tommins
On Mon, 18 Nov 2019 at 17:55, Mike Schinkel wrote: > > Yes, a team lead could require an interface be used for consistency across > a team, which is fine, but it is not consistent across unrelated projects. > Having worked with GoLang for a while where interfaces are not required to > be

[PHP-DEV] Enabling ArrayObject et.al. to fully replace array usage

2019-11-18 Thread Mike Schinkel
I decided to create a new thread since I was diverging the topic. > On Nov 18, 2019, at 5:36 AM, Michał Brzuchalski > wrote: > Currently, arrays all together with rest of scalar types are value-types > which means when they're passed on (unless passed by a reference) their > copies are

Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread Mike Schinkel
> On Nov 18, 2019, at 5:53 AM, Rowan Tommins wrote: > > On Mon, 18 Nov 2019 at 00:18, Mike Schinkel wrote: >> Even if short, a code base littered with method names like toV5Json() or >> getV5Array() or formatForJsonV5() is still inconsistent. > > Inconsistent with what? Inconsistent with

[PHP-DEV] Saxon/C - PHP C++ extension threading issues

2019-11-18 Thread O'Neil Delpratt
Hi, Consultancy help: I have written an PHP 7.X extension to my Saxon/C C++ API. My C++ program has an Excelsior JET JNI environment which is created as a static variable at the start of the program and released at the end. The threads are created by the JET Runtime, e.g. GC thread, weak

Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread Rowan Tommins
On Mon, 18 Nov 2019 at 00:18, Mike Schinkel wrote: > I now realize that my commenting on my experience in reviewing legacy code > — where long names are frequently used, regardless of the fact they are not > required — caused you to focus on the long naming comment aside and not on > the primary

Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread Michał Brzuchalski
pon., 18 lis 2019 o 09:39 Peter Bowyer napisał(a): > On Sun, 17 Nov 2019 at 23:44, Ben Ramsey wrote: > > > > > > On Nov 17, 2019, at 17:28, Mike Schinkel wrote: > > > > > > If we are going to open up arrays for enhancement in PHP 8 I would ask > > that we seriously consider addressing the

RE: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread CHU Zhaowei
The union types RFC passed, so I didn't see much value in the arrayable pseudo except pressing less keys. Regarding the Arrayable interface, or toArray method. Since it extends Iterator, iterator_to_array can do the job already. So what's the benfits for introducing this new interface? I

Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread Peter Bowyer
On Sun, 17 Nov 2019 at 23:44, Ben Ramsey wrote: > > > On Nov 17, 2019, at 17:28, Mike Schinkel wrote: > > > > If we are going to open up arrays for enhancement in PHP 8 I would ask > that we seriously consider addressing the various differences between a > built-in array and an instance of