On Thu, Mar 6, 2025, at 23:31, Tim Düsterhus wrote:
> Hi
>
> On 3/6/25 23:05, Rob Landers wrote:
> >>
> >> Closure::fromCallable('Outer::Inner::method');
> >
> > You end up with:
> >
> > object(Closure)#1 (1) {
> >["function"]=>
> >string(20) "Outer::Inner::method"
> > }
>
> Oka
On Thu, Mar 6, 2025, at 23:20, Ilija Tovilo wrote:
> Hi Rob
>
> On Thu, Mar 6, 2025 at 12:14 AM Rob Landers wrote:
> >
> > I'd like to introduce my RFC for discussion:
> > https://wiki.php.net/rfc/short-and-inner-classes
>
> Thank you for your proposal.
>
> I'm very much against the idea of
Hi Rob
On Thu, Mar 6, 2025 at 12:14 AM Rob Landers wrote:
>
> I'd like to introduce my RFC for discussion:
> https://wiki.php.net/rfc/short-and-inner-classes
Thank you for your proposal.
I'm very much against the idea of introducing yet another slightly
shorter form to declare a class. In your
On 06/03/2025 07:49, Edmond Dantes wrote:
> Defining new syntax would encourage us to define a minimum top-level
> behaviour, such as "inside an async{} block, these things are possible,
> and these things are guaranteed to be true"
True. This is precisely the main reason not to change the synta
> Of course, this is not an elegant solution, as it adds one more rule to the
> language, making it more complex. However, from a legacy perspective, it
> seems like a minimal scar.
> (to All: Please leave your opinion if you are reading this )
>
Larry’s approach seems like a horrible idea to m
> Of course, this is not an elegant solution, as it adds one more rule to the
> language, making it more complex. However, from a legacy perspective, it
> seems like a minimal scar.
> (to All: Please leave your opinion if you are reading this )
>
Larry’s approach seems like a horrible idea to m
Hi Rob,
czw., 6 mar 2025 o 00:16 Rob Landers napisał(a):
> Hello PHP Internals,
>
> I'd like to introduce my RFC for discussion:
> https://wiki.php.net/rfc/short-and-inner-classes
>
> This RFC defines a short class syntax as well as the ability to nest
> classes inside another class. This introd
> In a syntax-and-semantics approach, we only need to describe the things
people actually need.
There is no doubt that syntax provides the programmer with a clear tool for
expressing intent.
> In the same way, do we actually need to design what an "async context"
looks like to the user?
Its imp
On 2025-03-06 10:04, Tim Düsterhus wrote:
- I don't understand the use of `private` properties. Given that the
classes cannot have methods, they would be inaccessible, no?
I think the RFC was a bit unclear on this. Short classes can have
methods. The short syntax just doesn't provide the abil
Hello, Daniil.
> Essentially, the only thing that’s needed for backwards-compatibility in
most cases is an API that can be used to register onWritable,
> onReadable callbacks for streams and a way to register delayed (delay)
tasks, to completely remove the need to invoke stream_select.
Thank you
> One key question, if we disallow explicitly creating Fibers inside an
async block,
> can a Fiber be created outside of it and not block async, or would that
also be excluded? Viz, this is illegal:
>
Creating a `Fiber` outside of an asynchronous block is allowed; this
ensures backward compatibi
Hi
On 3/6/25 20:08, Niels Dossche wrote:
What I'm less in favor of is the implementation choice to expose the inner
class as a property/const and using a fetch mode to grab it.
That feels quite weird to me honestly. How did you arrive at this choice?
Somewhat relatedly, the RFC does not menti
On Thu, Mar 6, 2025, at 22:00, Tim Düsterhus wrote:
> Hi
>
> On 3/6/25 20:08, Niels Dossche wrote:
> > What I'm less in favor of is the implementation choice to expose the inner
> > class as a property/const and using a fetch mode to grab it.
> > That feels quite weird to me honestly. How did you
On 06/03/2025 11:31, Edmond Dantes wrote:
For example, PHP has functions for working with HTTP. One of them
writes the last received headers into a "global" variable, and another
function allows retrieving them. This is where a context is needed.
OK, let's dig into this case: what is the actu
Hi
On 3/6/25 22:38, Rob Landers wrote:
I put a lot of thought into this issue off and on, all day. I've decided to
remove short syntax from the RFC and focus on inner classes.
Good choice.
Don't forget to update the title of the RFC in the Overview page:
https://wiki.php.net/rfc
Best rega
Hi
On 3/6/25 23:05, Rob Landers wrote:
Closure::fromCallable('Outer::Inner::method');
You end up with:
object(Closure)#1 (1) {
["function"]=>
string(20) "Outer::Inner::method"
}
Okay, does calling the closure work and correctly call the `method` on
the inner class? The questio
On Thu, Mar 6, 2025, at 2:52 AM, Edmond Dantes wrote:
>> One key question, if we disallow explicitly creating Fibers inside an async
>> block,
>> can a Fiber be created outside of it and not block async, or would that also
>> be excluded? Viz, this is illegal:
>>
> Creating a `Fiber` outside o
On Wed, Mar 5, 2025, at 5:11 PM, Rob Landers wrote:
> Hello PHP Internals,
>
> I'd like to introduce my RFC for discussion:
> https://wiki.php.net/rfc/short-and-inner-classes
I agree with others who have said this should be two RFCs. They stand alone,
but can complement each other well. That's
18 matches
Mail list logo