Here we go again!  Looking at you, attributes syntax.

Seriously though, any of `this`, `active`, `current`, or even `Fiber::self`
are fine with me.

You might have the same issue with that last one.

Thanks,
Peter



On Mon., Mar. 8, 2021, 14:57 Larry Garfield, <la...@garfieldtech.com> wrote:

> On Mon, Mar 8, 2021, at 1:40 PM, Aaron Piotrowski wrote:
> > Greetings everyone!
> >
> > The vote has started on the fiber RFC: https://wiki.php.net/rfc/fibers
> > <https://wiki.php.net/rfc/fibers>
> >
> > Voting will run through March 22nd.
> >
> > Cheers,
> > Aaron Piotrowski
>
> This is vastly improved from the earlier drafts I saw.  Well done, Aaron!
>
> There is one issue that still stands out like a sore thumb to me, which I
> really should have reviewed and caught earlier.  (Entirely my fault.)
> Fiber::this() seems like a very poorly chosen name for that method.  "this"
> in PHP implies "the object I am currently in."  Even if there's no $ on a
> method, that's still the mental association that word has in PHP.  But in
> this case, Fiber::this() does not mean "the object I'm currently in," but
> "the Fiber object that wraps the callable I'm currently in, which is itself
> an object but not the object I mean, but there may be an arbitrary number
> of call stack levels between me and that Fiber object."  That's... very
> confusing for a human, even if syntactically unambiguous.
>
> I am still voting Yes on the RFC, but I would urge you to follow-up (with
> another RFC, or a consensus agreement, no one telling you not to, or
> whatever the process is, I'm easy) with renaming that method to something
> less confusing.  Fiber::active() seems like the best name to me (after some
> discussion with Aaron off-list), as it refers the fiber that is currently
> "actively" executing opcodes.
>
> Otherwise, well done and I look forward to when we can build a
> standardized user-facing API on top of it. :-)
>
> --Larry Garfield
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

Reply via email to