Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
> I talked with Joe about this, and the answer is no. Most of the complexity > comes from the initial "this is a function call, oops no, it's a partial > call so we switch to doing that instead", which ends up interacting with the > engine in a lot of different places. Once you've done that, supp

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > Mm. Assoc arrays are by now known to be not so good. I hope... There are millions of PHP sites build on anonymous arrays today. > OCaml is strictly evaluated, not lazy like Haskell. So the order might > matter, dunno, I don't use this oper

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-29 0:06 GMT+02:00, Rowan Tommins : > On 28/06/2021 21:28, Olle Härstedt wrote: >> Sorry for hijacking the thread, but are there no other alternatives, >> really? Just brainstorming: >> >> 1) Setting to silence the warning. > > > Just to reiterate: in PHP 8.0, an undefined constant is not a

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 23:36 GMT+02:00, Larry Garfield : > On Mon, Jun 28, 2021, at 3:42 PM, Olle Härstedt wrote: >> 2021-06-28 22:12 GMT+02:00, Larry Garfield : >> > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: >> >> On 28/06/2021 20:25, Olle Härstedt wrote: >> >> > Usage (ignoring the pesky undefin

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Rowan Tommins
On 28/06/2021 21:28, Olle Härstedt wrote: Sorry for hijacking the thread, but are there no other alternatives, really? Just brainstorming: 1) Setting to silence the warning. Just to reiterate: in PHP 8.0, an undefined constant is not a warning, it's an error. My apologies to code golfers: yo

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 3:42 PM, Olle Härstedt wrote: > 2021-06-28 22:12 GMT+02:00, Larry Garfield : > > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: > >> On 28/06/2021 20:25, Olle Härstedt wrote: > >> > Usage (ignoring the pesky undefined constant warnings ><): > >> > >> > >> Unfortunat

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 22:12 GMT+02:00, Larry Garfield : > On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: >> On 28/06/2021 20:25, Olle Härstedt wrote: >> > Usage (ignoring the pesky undefined constant warnings ><): >> >> >> Unfortunately, you can't ignore those warnings; not least because >> they're fa

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-28 22:04 GMT+02:00, Rowan Tommins : > On 28/06/2021 20:25, Olle Härstedt wrote: >> Usage (ignoring the pesky undefined constant warnings ><): > > > Unfortunately, you can't ignore those warnings; not least because > they're fatal errors in PHP 8, as they frankly should have been in PHP 3. >

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 3:04 PM, Rowan Tommins wrote: > On 28/06/2021 20:25, Olle Härstedt wrote: > > Usage (ignoring the pesky undefined constant warnings ><): > > > Unfortunately, you can't ignore those warnings; not least because > they're fatal errors in PHP 8, as they frankly should have b

Re: [PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 1:36 PM, Nicolas Grekas wrote: > >> > Actually, we talked off the list about a way to possibly make this work > >> > with __clone(): > >> > > >> > We could allow __clone to have one argument, the object being cloned. > >> And > >> > when the signature declares this argumen

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Rowan Tommins
On 28/06/2021 20:25, Olle Härstedt wrote: Usage (ignoring the pesky undefined constant warnings ><): Unfortunately, you can't ignore those warnings; not least because they're fatal errors in PHP 8, as they frankly should have been in PHP 3. You can use our current ugly callable syntax (stri

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Björn Larsson via internals
Den 2021-06-28 kl. 16:52, skrev Nikita Popov: On Mon, Jun 21, 2021 at 4:26 PM Björn Larsson mailto:bjorn.x.lars...@telia.com>> wrote: Would you look on this feature in a different light if the above concerns about strict types and nullsafe calls could be clarified / solved? Or is it

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-06-28 Thread Jan Ehrhardt
Nikita Popov in php.internals (Mon, 22 Mar 2021 10:24:51 +0100): >Hi internals, > >It's time for another deprecation RFC: >https://wiki.php.net/rfc/deprecations_php_8_1 FWIW, a quick search returned these results. ADOdb still uses strftime() https://adodb.org/dokuwiki/doku.php 2 plugins of Matom

Re: [PHP-DEV] [RFC] Pipe Operator, take 2

2021-06-28 Thread Olle Härstedt
2021-06-07 21:00 GMT+02:00, Larry Garfield : > Hi folks. Me again. > > A year ago, I posted an RFC for a pipe operator, |>, aka function > concatenation. At the time, the main thrust of the feedback was "cool, > like, but we need partial function application first so that the syntax for > callable

Re: [PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Nicolas Grekas
Le lun. 28 juin 2021 à 20:30, Nicolas Grekas a écrit : > > > Le lun. 28 juin 2021 à 18:22, Larry Garfield a > écrit : > >> On Mon, Jun 28, 2021, at 11:17 AM, Nicolas Grekas wrote: >> > > > I'd like to open the discussion on readonly properties: >> > > > https://wiki.php.net/rfc/readonly_properti

Re: [PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Nicolas Grekas
Le lun. 28 juin 2021 à 18:22, Larry Garfield a écrit : > On Mon, Jun 28, 2021, at 11:17 AM, Nicolas Grekas wrote: > > > > I'd like to open the discussion on readonly properties: > > > > https://wiki.php.net/rfc/readonly_properties_v2 > > > > > > > > This proposal is similar to the > > > > https:/

Re: [PHP-DEV] is_literal() compile-time awkwardness

2021-06-28 Thread Bruce Weirdan
On Mon, Jun 28, 2021 at 7:21 PM Craig Francis wrote: > There’s an awkward hitch with removing integer support. Correct me if I'm wrong, but all those inconsistencies would happen even if all integers were considered literal, e.g. https://3v4l.org/C9YpE/vld#output clearly performed compile-time c

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Olle Härstedt
On Mon, 28 Jun 2021, 18:49 Levi Morrison, wrote: > On Mon, Jun 28, 2021 at 10:32 AM Olle Härstedt > wrote: > > > > On Thu, 24 Jun 2021, 18:02 Larry Garfield, > wrote: > > > > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > > > Hi folks. The vote for the Partial Function Applicat

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Levi Morrison via internals
On Mon, Jun 28, 2021 at 10:32 AM Olle Härstedt wrote: > > On Thu, 24 Jun 2021, 18:02 Larry Garfield, wrote: > > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > > Hi folks. The vote for the Partial Function Application RFC is now > > > open, and will run until 30 June. > > > > > >

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Olle Härstedt
On Thu, 24 Jun 2021, 18:02 Larry Garfield, wrote: > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > Hi folks. The vote for the Partial Function Application RFC is now > > open, and will run until 30 June. > > > > https://wiki.php.net/rfc/partial_function_application > > > > Of parti

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Peter Bowyer
On Mon, 28 Jun 2021 at 17:08, Larry Garfield wrote: > Javascript doesn't have it natively, but there are 3rd party libraries > that try to do it. > There is a proposal to add it to the language: https://github.com/tc39/proposal-partial-application Peter

Re: [PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 11:17 AM, Nicolas Grekas wrote: > > > I'd like to open the discussion on readonly properties: > > > https://wiki.php.net/rfc/readonly_properties_v2 > > > > > > This proposal is similar to the > > > https://wiki.php.net/rfc/write_once_properties RFC that has been > > decline

[PHP-DEV] is_literal() compile-time awkwardness

2021-06-28 Thread Craig Francis
Hi Internals, There’s an awkward hitch with removing integer support. Fair warning, we’re about to get into some under the hood stuff: During the compilation process (before any user data is involved), PHP makes tiny optimisations to code e.g. `”a” . 1` becomes `”a1”`. In the parts where this hap

Re: [PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Nicolas Grekas
> > I'd like to open the discussion on readonly properties: > > https://wiki.php.net/rfc/readonly_properties_v2 > > > > This proposal is similar to the > > https://wiki.php.net/rfc/write_once_properties RFC that has been > declined > > previously. One significant difference is that the new RFC limi

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 9:52 AM, Nikita Popov wrote: > These were just some notes on implementation details, they don't really > impact my overall opinion of the RFC. I should also say that I'm not > strongly opposed here, I'm just not convinced this is worthwhile :) The > complexity of the featu

Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-06-28 Thread Christoph M. Becker
On 28.06.2021 at 16:25, Nikita Popov wrote: > On Sat, Jun 19, 2021 at 1:04 AM Rowan Tommins > wrote: > >> On 18/06/2021 22:16, Derick Rethans wrote: >>> strftime is infected by thread unsafe locales, which is plenty of reason >> to deprecate it, with additional pro reasons for doing so being its

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Nikita Popov
On Mon, Jun 21, 2021 at 4:26 PM Björn Larsson wrote: > Den 2021-06-18 kl. 16:08, skrev Nikita Popov: > > On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield > > wrote: > > > >> Hi folks. The vote for the Partial Function Application RFC is now > open, > >> and will run until 30 June. > >> > >> https

Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-06-28 Thread Nikita Popov
On Sat, Jun 19, 2021 at 1:04 AM Rowan Tommins wrote: > On 18/06/2021 22:16, Derick Rethans wrote: > > strftime is infected by thread unsafe locales, which is plenty of reason > to deprecate it, with additional pro reasons for doing so being its > disparate functionality among different os-es and

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-06-28 Thread Nikita Popov
On Mon, Mar 22, 2021 at 10:24 AM Nikita Popov wrote: > Hi internals, > > It's time for another deprecation RFC: > https://wiki.php.net/rfc/deprecations_php_8_1 > I plan to open voting on this RFC soon. Based on the recent discussion, I think I'll keep all deprecations in the RFC, but vote agains

[PHP-DEV] Re: [RFC] Readonly properties

2021-06-28 Thread Nikita Popov
On Fri, Jun 4, 2021 at 5:19 PM Nikita Popov wrote: > Hi internals, > > I'd like to open the discussion on readonly properties: > https://wiki.php.net/rfc/readonly_properties_v2 > > This proposal is similar to the > https://wiki.php.net/rfc/write_once_properties RFC that has been declined > previo

[PHP-DEV] Re: [RFC] Deprecate ticks

2021-06-28 Thread Nikita Popov
On Thu, Jun 10, 2021 at 3:21 PM Nikita Popov wrote: > On Tue, May 11, 2021 at 10:52 AM Nikita Popov > wrote: > >> Hi internals, >> >> I'd like to propose the depreciation of the ticks mechanism: >> https://wiki.php.net/rfc/deprecate_ticks >> >> I'm submitting this separately from the PHP 8.1 dep

Re: [PHP-DEV] [RFC] New in initializers

2021-06-28 Thread Nikita Popov
On Tue, Jun 15, 2021 at 5:06 PM Nikita Popov wrote: > On Fri, Jun 11, 2021 at 5:02 PM Larry Garfield > wrote: > >> On Wed, Mar 3, 2021, at 9:03 AM, Nikita Popov wrote: >> > Hi internals, >> > >> > I would like to propose allowing the use of "new" inside various >> > initializer expressions: http

Re: [PHP-DEV] [Proposal] call_user_func_map(): flexible named parameter mapping for call_user_func*

2021-06-28 Thread Nikita Popov
On Sun, Jun 27, 2021 at 4:39 PM Ralph Schindler wrote: > The short proposal: > > > Make a variation of this work (notice parameter order and 'b' is goes > unused): > > call_user_func_map( >fn ($c, $a) => var_dump($a, $c), >[ > 'a' => 'the a value', > 'b' =>

Re: [PHP-DEV] [RFC] clamp

2021-06-28 Thread Nikita Popov
On Wed, Jun 23, 2021 at 8:43 PM Kim Hallberg wrote: > Hello internals, > > The RFC for the clamp function is now open and under discussion, you now > have 2 weeks > to discuss, suggest improvements and open issues before voting is > considered. > > Any and all feedback is welcomed. > > The RFC is