Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Gina P. Banyard
On Thursday, 15 August 2024 at 17:22, Rob Landers wrote: > Hello internals, > > I've decided to attempt an RFC for function autoloading. After reading > hundreds of ancient (and recent) emails relating to the topic along with > several abandoned RFCs from the past, and after much review, I've d

Re: [PHP-DEV] Should there be a `get_declared_enums()` function ?

2024-08-19 Thread Juliette Reinders Folmer
On 15-8-2024 3:51, Juliette Reinders Folmer wrote: L.S., I just noticed the following, which struck me as weird/inconsistent: There are four different OO structures in PHP: 1. Classes 2. Interfaces 3. Traits 4. Enums For all four, an `*_exists()` function is available, i.e. `class_exists()`,

Re: [PHP-DEV] String enums & __toString()

2024-08-19 Thread Levi Morrison
On Fri, Aug 16, 2024 at 1:43 PM John Coggeshall wrote: > > Hey all, > > I poked around a bit in the Enum RFCs and I could find (maybe I missed) > what's up with this: > > enum Foo:string implements \Stringable > { > case FOO = 'bar'; > > public function __toString() { > return $th

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Rob Landers
On Mon, Aug 19, 2024, at 14:03, Gina P. Banyard wrote: > On Thursday, 15 August 2024 at 17:22, Rob Landers wrote: >> Hello internals, >> >> I've decided to attempt an RFC for function autoloading. After reading >> hundreds of ancient (and recent) emails relating to the topic along with >> sever

[PHP-DEV] State of Generics and Collections

2024-08-19 Thread Derick Rethans
Hi! Arnaud, Larry, and I have been working on an article describing the state of generics and collections, and related "experiments". You can find this article on the PHP Foundation's Blog: https://thephp.foundation/blog/2024/08/19/state-of-generics-and-collections/ cheers, Derick

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Rob Landers
On Mon, Aug 19, 2024, at 19:08, Derick Rethans wrote: > Hi! > > Arnaud, Larry, and I have been working on an article describing the > state of generics and collections, and related "experiments". > > You can find this article on the PHP Foundation's Blog: > https://thephp.foundation/blog/2024/08

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Mel Dafert
On August 15, 2024 5:22:51 PM GMT+02:00, Rob Landers wrote: >Hello internals, > >I've decided to attempt an RFC for function autoloading. After reading >hundreds of ancient (and recent) emails relating to the topic along with >several abandoned RFCs from the past, and after much review, I've dec

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Rowan Tommins [IMSoP]
On 19/08/2024 17:23, Rob Landers wrote: As far as performance for ambiguous functions go, I was thinking of submitting an RFC, where ambiguous function calls are tagged during compilation and always resolve lexically, sorta like how it works now: echo strlen($x); // resolves to global, always

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Valentin Udaltsov
On Monday, 19 of August 2024 г. at 20:11, Derick Rethans wrote: > Hi! > > Arnaud, Larry, and I have been working on an article describing the > state of generics and collections, and related "experiments". > > You can find this article on the PHP Foundation's Blog: > > https://thephp.foundation/b

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Bob Weinand
On 19.8.2024 19:08:32, Derick Rethans wrote: Hi! Arnaud, Larry, and I have been working on an article describing the state of generics and collections, and related "experiments". You can find this article on the PHP Foundation's Blog: https://thephp.foundation/blog/2024/08/19/state-of-generics-

[PHP-DEV] Re: [RFC] Decoding HTML and the Ambiguous Ampersand

2024-08-19 Thread Dennis Snell
> On Jul 9, 2024, at 4:55 PM, Dennis Snell wrote: > > Greetings all, > > The `html_entity_decode( … ENT_HTML5 … )` function has a number of issues > that I’d like to correct. > > - It’s missing 720 of HTML5’s specified named character references. > - 106 of these are named character referen

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Rob Landers
On Mon, Aug 19, 2024, at 23:17, Rowan Tommins [IMSoP] wrote: > On 19/08/2024 17:23, Rob Landers wrote: > > > As far as performance for ambiguous functions go, I was thinking of > > submitting an RFC, where ambiguous function calls are tagged during > > compilation and always resolve lexically,

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Rob Landers
On Mon, Aug 19, 2024, at 19:08, Derick Rethans wrote: > Hi! > > Arnaud, Larry, and I have been working on an article describing the > state of generics and collections, and related "experiments". > > You can find this article on the PHP Foundation's Blog: > https://thephp.foundation/blog/2024/08

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Mike Schinkel
> On Aug 19, 2024, at 1:08 PM, Derick Rethans wrote: > > Hi! > > Arnaud, Larry, and I have been working on an article describing the > state of generics and collections, and related "experiments". > > You can find this article on the PHP Foundation's Blog: > https://thephp.foundation/blog/2024

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Mike Schinkel
> On Aug 19, 2024, at 7:37 PM, Rob Landers wrote: > As an experiment, awhile ago, I went a different route for reified generics > by 'hacking' type aliases (which I was also experimenting with). Such that a > generic becomes compiled into a concrete implementation with a dangling type > alias:

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Larry Garfield
On Mon, Aug 19, 2024, at 5:16 PM, Bob Weinand wrote: > Regarding the Collections PR, I personally really don't like it: > > • It implements something which would be trivial if we had reified > generics. If this ever gets merged, and generics happen later, it would > be probably outdated and qui

Re: [PHP-DEV] State of Generics and Collections

2024-08-19 Thread Bob Weinand
On 20.8.2024 03:31:05, Larry Garfield wrote: On Mon, Aug 19, 2024, at 5:16 PM, Bob Weinand wrote: Regarding the Collections PR, I personally really don't like it: • It implements something which would be trivial if we had reified generics. If this ever gets merged, and generics happen later,

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-19 Thread Rowan Tommins [IMSoP]
On 20 August 2024 00:21:22 BST, Rob Landers wrote: > >I assume you are worried about something like this passing test? > >--TEST-- >show called only once >--FILE-- > >namespace test; > >spl_autoload_register(function($name) { >echo "name=$name\n"; >}, true, false, SPL_AUTOLOAD_FUNCTION); >