Re: [PHP-DEV] [VOTE] Fibers

2021-03-20 Thread Josh Di Fabio
HI Rowan, Thanks for sharing your thoughts. On Fri, Mar 19, 2021 at 7:55 PM Rowan Tommins wrote: > > On 18/03/2021 09:20, Josh Di Fabio wrote: > > "If you want to enable fibers in your application, you must be > > confident about the implementation details of

Re: [PHP-DEV] [VOTE] Fibers

2021-03-18 Thread Josh Di Fabio
On Thu, Mar 18, 2021 at 1:55 PM Guilliam Xavier wrote: > > Hi, > >> Guzzle's requestAsync() returns a promise, it does not >> interrupt/suspend the callsite. For example: >> >> // this function is not interrupted/suspended -- it will return >> synchronously >> function doSomething() { >>

Re: [PHP-DEV] [VOTE] Fibers

2021-03-18 Thread Josh Di Fabio
Hi Peter, Thanks for clarifying. On Thu, Mar 18, 2021 at 2:43 AM Peter Stalman wrote: > > On Wed, Mar 17, 2021 at 7:41 AM Josh Di Fabio wrote: >> >> Note the difference between the two. Also note how, in both of the >> above cases, the asynchronicity is explicit and th

Re: [PHP-DEV] [VOTE] Fibers

2021-03-17 Thread Josh Di Fabio
On Wed, Mar 17, 2021 at 9:06 AM Peter Stalman wrote: > > On Tue., Mar. 16, 2021, 23:49 Josh Di Fabio, wrote: >> >> Imagine for a moment that you create a library, awesome-library-x, >> which uses a PSR logger internally. You will most certainly allow that >> l

Re: [PHP-DEV] [VOTE] Fibers

2021-03-16 Thread Josh Di Fabio
Hi Peter, Thanks for the feedback! On Wed, Mar 17, 2021 at 3:02 AM Peter Stalman wrote: > > On Tue., Mar. 16, 2021, 13:58 Josh Di Fabio, wrote: >> >> Fibers will not make those issues obvious at all. The issues I'm >> describing will only crop up spontaneously

Re: [PHP-DEV] [VOTE] Fibers

2021-03-16 Thread Josh Di Fabio
Hi Larry, Thanks for the feedback. Replies inline. On Tue, Mar 16, 2021 at 8:33 PM Larry Garfield wrote: > > On Tue, Mar 16, 2021, at 1:44 PM, Josh Di Fabio wrote: > > > Perhaps we could rather make fibers *opt in* at the *callsite* > > (similar to goroutine calls) in order

Re: [PHP-DEV] [VOTE] Fibers

2021-03-16 Thread Josh Di Fabio
Hi Niklas, On Tue, Mar 16, 2021 at 8:07 PM Niklas Keller wrote: > > Hey Josh, > >> >> > This is a very valid concern to have. However, this code won't simply >> > break if executed asynchronously. >> > It only breaks if the same method (or other methods making use of the same >> > state) is exe

Re: [PHP-DEV] [VOTE] Fibers

2021-03-16 Thread Josh Di Fabio
On Tue, Mar 16, 2021 at 6:20 PM Niklas Keller wrote: > > Hey Josh, > >> >> Apologies, this is a long one! >> >> This RFC strikes me as being very dangerous. Implicitly allowing code >> which is synchronous by design to be executed asynchronously seems >> sure to lead to very subtle, unpredictable,

Re: [PHP-DEV] [VOTE] Fibers

2021-03-16 Thread Josh Di Fabio
On Fri, Mar 12, 2021 at 10:54 PM Aaron Piotrowski wrote: > > > > On Mar 12, 2021, at 4:36 PM, Christoph M. Becker wrote: > > > > On 12.03.2021 at 23:04, Michael Wallner wrote: > > > >> Thank you, and everyone involved, for your effort. > >> > >> On 08/03/2021 20.40, Aaron Piotrowski wrote: > >>>

Re: [PHP-DEV] Re: [RFC] Arrow functions / short closures

2019-04-12 Thread Josh Di Fabio
On Fri, Apr 12, 2019 at 4:27 PM Fabien S wrote: > > > > On 12 Apr 2019, at 16:46, Theodore Brown wrote: > > > > On Thursday, April 11, 2019 at 10:22 AM Fabien S > > wrote: > > > >> I really like the Haskell `\($x)` syntax, could someone confirm if > >> it would possible to drop the parenthesis

Re: [PHP-DEV] Re: [RFC] Arrow functions / short closures

2019-03-15 Thread Josh Di Fabio
On Thu, Mar 14, 2019 at 7:42 PM Theodore Brown wrote: > > On Thu, March 14, 2019 10:41 AM Nikita Popov wrote: > > > On Wed, Mar 13, 2019 at 4:56 PM Nikita Popov wrote: > > > > > Hi internals, > > > > > > Motivated by the recent list comprehensions RFC, I think it's time we took > > > another loo

Re: [PHP-DEV] [RFC] Arrow functions / short closures

2019-03-14 Thread Josh Di Fabio
On Thu, Mar 14, 2019 at 3:49 PM Rowan Collins wrote: > > Is it really that important to save two key strokes per closure? > I'd say that the (probably overwhelming) majority of arrow functions have a single parameter and, in those cases, the JS syntax saves four characters, ignoring whitespace. A

[PHP-DEV] Internal LRU cache implementation

2018-08-01 Thread Josh Di Fabio
Hello internals, In my experience, LRU cache is a common pattern in userland. Each time I write one in PHP, I suspect that it would probably be much more efficient if it was implemented in C. If this is indeed a very common pattern, and it would be much more efficient implemented internally, is t

Re: [PHP-DEV] [RFC] Parameter No Type Variance

2016-11-21 Thread Josh Di Fabio
On Mon, Nov 21, 2016 at 9:40 AM Niklas Keller wrote: > Morning Internals, > > I'd like to announce a RFC to allow omitting the type declarations for > parameters in subclasses: > https://wiki.php.net/rfc/parameter-no-type-variance > > PHP doesn't currently allow variance for parameters as checkin

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Josh Di Fabio
On Thu, Nov 17, 2016 at 2:01 PM Craig Duncan wrote: > On 17 November 2016 at 13:50, Josh Di Fabio wrote: > > What's the benefit of such an interface? Why not simply ask for `int > $count` in your param list instead? > > > Using the example from my original email, it

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Josh Di Fabio
On Thu, Nov 17, 2016 at 1:00 PM Levi Morrison wrote: > On Thu, Nov 17, 2016 at 5:52 AM, Craig Duncan wrote: > > Hi everybody > > > > Following on from the recent rfc for *count()* ( > > https://wiki.php.net/rfc/counting_non_countables) and the one for > *iterable* > > (https://wiki.php.net/rfc/i

Re: [PHP-DEV] [RFC][VOTE] Object typehint

2016-11-14 Thread Josh Di Fabio
On Mon, Nov 14, 2016 at 8:54 AM MichaƂ Brzuchalski wrote: > Hi All, > > Id' like to anounce voting reset - will end in two weeks on 28.11.2016 at > midnight and requires 2/3 majority as previously. > > There were improvements suggested by Joe Watkins and earlier by Nikita > Popov to the patch. >

Re: [PHP-DEV] [RFC] Intersection Types

2016-04-28 Thread Josh Di Fabio
On Thu, Apr 28, 2016 at 4:54 AM, Levi Morrison wrote: > Internals, > > As alluded to last week I have another RFC for improving the type > system: [intersection types][1]. > > It allows parameters to define multiple type constraints that must be > satisfied. Common combinations of our built-in typ

Re: [PHP-DEV] [RFC:generics]

2016-04-21 Thread Josh Di Fabio
On Wed, Apr 20, 2016 at 8:17 PM, Dominic Grostate wrote: > Thanks for you're input everyone. > > So far, we have read some ideas for handling upper bounds, or multiple there > of. > The preferred keywords appear to be either "as" or "instanceof". > > class Foo {} > class Foo {} > > We would like t

Re: [PHP-DEV] [RFC:generics]

2016-04-18 Thread Josh Di Fabio
On Mon, Apr 18, 2016 at 10:47 AM, Josh Di Fabio wrote: > On Mon, Apr 18, 2016 at 6:20 AM, Rasmus Schultz wrote: >> Hello internals, >> >> I'd like to introduce an RFC proposing the addition of generic types >> and functions: >> >> https://wiki.php.net/

Re: [PHP-DEV] [RFC:generics]

2016-04-18 Thread Josh Di Fabio
On Mon, Apr 18, 2016 at 6:20 AM, Rasmus Schultz wrote: > Hello internals, > > I'd like to introduce an RFC proposing the addition of generic types > and functions: > > https://wiki.php.net/rfc/generics > > Ben Scholzen started this RFC as a quick draft with a few code samples > in August last year

Re: [PHP-DEV] PHP 7.0.0RC7 is available

2015-11-12 Thread Josh Di Fabio
All of you guys contributing to the core are brilliant people doing great work; as a userland developer I just want to say thanks and keep up the good work! Thank you! On Thu, Nov 12, 2015 at 1:11 PM, wrote: > Hi, > > The seventh release candidate for 7.0.0 was just released and can be > downlo

Re: [PHP-DEV] Re: Some words about the basic ideas of PHP

2015-10-27 Thread Josh Di Fabio
There have been some good points made here but I think everything which needs to be said has been said. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-23 Thread Josh Di Fabio
Great suggestion, Remi, I'd love to see this change! On Wed, Jul 22, 2015 at 7:49 PM, Sara Golemon wrote: > > On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet wrote: > > See https://bugs.php.net/bug.php?id=70112 > > > I'm not inherently against it, but this really really sounds like a > job for a us