Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-14 Thread Sara Golemon
On Sat, May 14, 2016 at 3:33 AM, François Laupretre wrote: > Le 14/05/2016 à 01:36, Simon Welsh a écrit : \>> Sure, you could try to use the type of the value being passed in, >> but that ends up much more magic and then you run into the same >> problem with strpos, or

Re: [PHP-DEV] [RFC] Simple Annotations

2016-05-14 Thread Benjamin Eberlei
On Sat, May 14, 2016 at 1:48 PM, Rasmus Schultz wrote: > Thank you for your comments! > > Benjamin, > > I have removed the comment about annotation expressions executing in > an empty closure, since this example was clearly confusing, and I have > tried to clarify the fact

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-14 Thread François Laupretre
Le 13/05/2016 à 20:16, Sara Golemon a écrit : for a potential solution to such a long-time issue as argument ordering sadness, IMHO, it's worth the pain. I am currently doing it and I'll send you the list when it is ready. Awesome. Even if not used in this feature, it could potentially be

Re: [PHP-DEV] [RFC] [Discussion] Third-party editing of RFCs

2016-05-14 Thread Yasuo Ohgaki
Hi Sara, On Fri, May 13, 2016 at 2:33 AM, Sara Golemon wrote: > https://wiki.php.net/rfc/rfc.third-party-editing > > Let's make RFCs more useful before AND after voting! Could you add performance section? I would like to know performance impact always, but not all RFCs include

Re: [PHP-DEV] [RFC] Simple Annotations

2016-05-14 Thread Rasmus Schultz
Dan, I've added a note about special annotations to the "future scope" section, naming the memoization-annotation as an example. Benjamin, I don't think you mean "out of scope" of what 80% want, I think you mean "beyond the scope"? I think this will definitely cover what 80% want to achieve,

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-14 Thread François Laupretre
Le 13/05/2016 à 20:16, Sara Golemon a écrit : Just to verify, you're suggesting an end-state something like this? $ret = array(1,2,3) |> array_map(function($x) { return $x * 2; }) // lhs implicitly passed as second arg |> array_sum(); // implicitly passed as only arg (first position) //

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-14 Thread François Laupretre
Le 14/05/2016 à 01:36, Simon Welsh a écrit : I’m not fond of this approach. Take in_array as an example. I have, in the same file, piped an array in as the second argument and piped a string in as the first. To have the position of the piped variable be implicit, you’ll need multiple versions of

Re: [PHP-DEV] [RFC] Simple Annotations

2016-05-14 Thread Rasmus Schultz
Thank you for your comments! Benjamin, I have removed the comment about annotation expressions executing in an empty closure, since this example was clearly confusing, and I have tried to clarify the fact that annotation expressions execute in an empty scope. To be clear, annotation expressions

Re: [PHP-DEV] [RFC] Simple Annotations

2016-05-14 Thread Dan Ackroyd
On 14 May 2016 at 12:48, Rasmus Schultz wrote: > > Hack's memoize is an annotation for the language interpreter itself - > that's beyond the scope of this RFC, but could be implemented in the > future. Please can you add something to the RFC that reserves the possibility to

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-14 Thread François Laupretre
Le 14/05/2016 à 18:35, Sara Golemon a écrit : On Sat, May 14, 2016 at 3:33 AM, François Laupretre wrote: Le 14/05/2016 à 01:36, Simon Welsh a écrit : \>> Sure, you could try to use the type of the value being passed in, but that ends up much more magic and then you run into