Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-04-04 Thread Matt Fonda
On Thu, Mar 20, 2025 at 9:51 AM Daniel Scherzer wrote: > On Sun, Mar 16, 2025 at 12:31 PM Matt Fonda > wrote: > >> Hi Daniel, >> >> I believe this feature essentially amounts to "add methods which can >> never be called", which in my mind make

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-31 Thread Matt Fonda
Hi Larry, On Fri, Mar 28, 2025 at 7:48 PM Larry Garfield wrote: > I have to think people are misunderstanding Nikita's earlier comment, or > perhaps that he phrased it poorly. > > The determination of whether a method call is type-compatible with the > parameters passed to it is made *at runtime

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-28 Thread Matt Fonda
1:27, schrieb Matt Fonda: > > If an interface adds a method but makes no promises about what > > parameters > > it accepts, then why is it part of the interface in the first > > place--why > > add a method that can't be used? > > It would more cleanly all

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-16 Thread Matt Fonda
On Mon, Mar 10, 2025 at 12:07 PM Daniel Scherzer < daniel.e.scher...@gmail.com> wrote: > Hi internals, > > I'd like to start discussion on a new RFC about allowing `never` for > parameter types when declaring a method. > > * RFC: https://wiki.php.net/rfc/never-parameters-v2 > * Implementation: htt

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-17 Thread Matt Fonda
On Fri, Dec 17, 2021 at 10:37 AM Jordan LeDoux wrote: > On Fri, Dec 17, 2021 at 9:43 AM Matt Fonda wrote: > >> Hi Jordan, >> >> Thanks for the RFC. I have a couple questions: >> >> Suppose I have classes Foo and Bar, and I want to support the following >&

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-17 Thread Matt Fonda
Hi Jordan, Thanks for the RFC. I have a couple questions: Suppose I have classes Foo and Bar, and I want to support the following operations: - Foo * Bar (returns Foo) - Bar * Foo (returns Foo) If I understand correctly, there are three possible ways I could implement this: a) Implement the *

Re: [PHP-DEV] [RFC][Draft] Body-less __construct

2021-05-11 Thread Matt Fonda
On Tue, May 11, 2021 at 7:45 AM Nikita Popov wrote: > My thought here is that a constructor with (only) promoted properties is > hardly a constructor at all -- it's more like a special syntax for > declaring properties that happens to re-use the constructor notation, > because that allows it gene

Re: [PHP-DEV] Re: [RFC] Autoloader Classmap

2021-04-06 Thread Matt Fonda
Hi Mark, I'm a fan of adding an easy and performant way to implement classmap-based autolading, but weary of adding yet another way to autoload. If it would be possible to do so without negating the performance improvements, I'd suggest having this work in conjunction with the existing spl_autoloa

Re: [PHP-DEV] Set object properties inline

2016-06-01 Thread Matt Fonda
On Tue, May 31, 2016 at 7:15 PM, Jesse Schalken wrote: > Hi internals, > > I often have code dealing with plain old PHP objects with properties and no > methods, either as a substitute for keyword arguments, or to represent a > JSON or YAML document for a web service, configuration file or schema