Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Rob Landers
On Wed, May 14, 2025, at 16:57, Rowan Tommins [IMSoP] wrote: > > > On 14 May 2025 14:24:57 BST, Michael Morris wrote: > >Well, it's what Go calls "modules". It's confusing because I was being > >truthful, not snarky, when I said "Ask 10 programmers for the definition of > >module and expect 12

[PHP-DEV] Re: PHP True Async RFC Stage 3

2025-05-14 Thread Edmond Dantes
Hello, everyone. While the code is being developed and changes for the RFC are in progress, I’d like to share a real-world situation. This is one of those cases that once again proves why software design cannot happen without writing real code — why architecture is impossible without practice. `

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Michael Morris
On Wed, May 14, 2025 at 4:08 AM Rowan Tommins [IMSoP] wrote: > > What Michael Morris is talking about is really a completely different > concept - it's more like "containers", in the sense of Docker, Kubernetes, > etc, where different sections of code can be isolated, and declare classes > with c

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Volker Dusch
On Wed, May 14, 2025 at 10:06 PM Matthew Weier O'Phinney < mweierophin...@gmail.com> wrote: > The only question that arose for me is: what happens if a property name is provided to `clone()` that does not exist in the class definition; what will be the behavior at that time? Will an exception or e

Re: [PHP-DEV] [Vote] Pipe operator

2025-05-14 Thread Theodore Brown
On Wed, May 14, 2025 at 09:08 Larry Garfield wrote: > On Tue, May 13, 2025, at 5:55 PM, Ilija Tovilo wrote: >> On Tue, May 13, 2025 at 3:58 AM Larry Garfield >> wrote: >>> >>> I hereby open the vote on the Pipe operator RFC: >>> >>> https://wiki.php.net/rfc/pipe-operator-v3 >> >> It looks like t

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Larry Garfield
On Wed, May 14, 2025, at 4:00 PM, Tim Düsterhus wrote: > The internal implementation is roughly equivalent to: > > $cloned = clone $object; > foreach ($withProperties as $key => $value) { > $cloned->{$key} = $value; > } > return $cloned; > > Just with the exception tha

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Rowan Tommins [IMSoP]
On 14 May 2025 21:50:25 BST, Michael Morris wrote: >Container, module, block, package, plugin, domain, division, fraction, >lump, branch, sliver, splinter, constituent or whatever the hell else you >call it, I don't care. I know you think I'm just being pedantic about names, but what I was tr

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Larry Garfield
On Wed, May 14, 2025, at 2:54 PM, Volker Dusch wrote: > On Wed, May 14, 2025 at 5:40 PM Larry Garfield wrote: >>> A magic __clone() method will be called before the new properties are >>> assigned. >> Why before and not after? I could probably make a good argument either >> direction, but we sh

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Rowan Tommins [IMSoP]
On 14 May 2025 14:24:57 BST, Michael Morris wrote: >Well, it's what Go calls "modules". It's confusing because I was being >truthful, not snarky, when I said "Ask 10 programmers for the definition of >module and expect 12 answers." I'm self trained, so I expect to get my >terms wrong from time

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Larry Garfield
On Wed, May 14, 2025, at 8:04 AM, Volker Dusch wrote: > Hi internals, > > A couple of weeks ago, we stumbled over the fact that the original > "clone with" RFC was abandoned and thought it would still be useful to > suggest a trimmed down version of the proposal. > > The main goal of this RFC is

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Michael Morris
On Wed, May 14, 2025 at 10:57 AM Rowan Tommins [IMSoP] wrote: > > I don't know much about Go, but at a glance it uses a similar model to > JavaScript and Python where *classes don't have a universal name*, the > names are always local. That's not a different kind of module, it's a > fundamentally

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Tim Düsterhus
Hi Am 2025-05-14 22:06, schrieb Matthew Weier O'Phinney: The only question that arose for me is: what happens if a property name is provided to `clone()` that does not exist in the class definition; what will be the behavior at that time? Will an exception or error be thrown? If so, will it b

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Volker Dusch
On Wed, May 14, 2025 at 5:40 PM Larry Garfield wrote: >> A magic __clone() method will be called before the new properties are assigned. > Why before and not after? I could probably make a good argument either direction, but we should be explicit about why we're making whatever decision. >From a

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Matthew Weier O'Phinney
On Wed, May 14, 2025 at 8:06 AM Volker Dusch wrote: > A couple of weeks ago, we stumbled over the fact that the original "clone > with" RFC was abandoned and thought it would still be useful to suggest a > trimmed down version of the proposal. > > The main goal of this RFC is to propose a lightwe

Re: [PHP-DEV] [RFC][Discussion] Policy release process update

2025-05-14 Thread Jorg Sowa
Thank you Jakub for tackling the problem of inconsistency between policy and practice. Taking my PR as case study, under this policy I am allowed to choose whatever approach I want? Either deprecation or validation error. https://github.com/php/php-src/pull/15647 > - Behavior changes in undefine

[PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Volker Dusch
Hi internals, A couple of weeks ago, we stumbled over the fact that the original "clone with" RFC was abandoned and thought it would still be useful to suggest a trimmed down version of the proposal. The main goal of this RFC is to propose a lightweight, low friction implementation of this featur

Re: [PHP-DEV] [Vote] Pipe operator

2025-05-14 Thread Larry Garfield
On Tue, May 13, 2025, at 5:55 PM, Ilija Tovilo wrote: > Hi Larry > > On Tue, May 13, 2025 at 3:58 AM Larry Garfield wrote: >> >> I hereby open the vote on the Pipe operator RFC: >> >> https://wiki.php.net/rfc/pipe-operator-v3 > > It looks like the example under "Rejected Features" is wrong. > > //

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Rowan Tommins [IMSoP]
On Tue, 13 May 2025, at 16:30, Deleu wrote: > If we consider how GitHub, Composer and Docker Hub works, we can pin a very > important aspect of "namespaces": {entity}/{project}. Entity may either be an > individual or an organization, but the concept is mostly the same. Although > it can be argu

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-14 Thread Rob Landers
On Wed, May 14, 2025, at 15:24, Michael Morris wrote: > > > On Wed, May 14, 2025 at 4:08 AM Rowan Tommins [IMSoP] > wrote: >> __ >> >> What Michael Morris is talking about is really a completely different >> concept - it's more like "containers", in the sense of Docker, Kubernetes, >> etc, w

Re: [PHP-DEV] [RFC] Clone with v2

2025-05-14 Thread Stephen Reay
> On 15 May 2025, at 06:26, Volker Dusch wrote: > > On Wed, May 14, 2025 at 10:06 PM Matthew Weier O'Phinney > mailto:mweierophin...@gmail.com>> wrote: > > > The only question that arose for me is: what happens if a property name is > > provided to `clone()` that does not exist in the class d