Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110027 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93790 invoked from network); 6 May 2020 07:50:24 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 6 May 2020 07:50:24 -0000 To: internals@lists.php.net,Nikita Popov References: Message-ID: <65803616-5117-e9f2-ba31-f2f8c323dfe9@php.net> Date: Wed, 6 May 2020 08:25:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: pl Content-Transfer-Encoding: 8bit X-Posted-By: 83.5.215.81 Subject: Re: [RFC] Named arguments From: sobak@php.net (Maciej Sobaczewski) Hi Nikita! W dniu 05.05.2020 o 15:51, Nikita Popov pisze: > Hi internals, > > I've recently started a thread on resurrecting the named arguments proposal > (https://externals.io/message/109549), as this has come up tangentially in > some recent discussions around attributes and around object ergonomics. > > I've now updated the old proposal on this topic, and moved it back under > discussion: https://wiki.php.net/rfc/named_params > > Relative to the last time I've proposed this around PHP 5.6 times, I think > we're technically in a much better spot now when it comes to the support > for internal functions, thanks to the stubs work. > > I think the recent acceptance of the attributes proposal also makes this a > good time to bring it up again, as phpdoc annotations have historically had > support for named arguments, and this will make migration to the > language-provided attributes smoother. > > Regards, > Nikita > I'm on the fence when it comes to the feature itself so I will skip that part entirerly but I'd like to draw attention to one more problem. Many PHP Manual translations translate the parameter names, too - both in text, as well as in the function/method signatures themselves. We would need to fix every such occurence for every language (at least active ones but there are still couple of them). Otherwise documentation will become highly misleading. Most people probably use IDEs of course but it still doesn't change the fact that the manual cannot be totally out of sync with what could become the language syntax. Cheers, Maciej.