Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110780 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13873 invoked from network); 29 Jun 2020 16:25:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jun 2020 16:25:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D44A1804E2 for ; Mon, 29 Jun 2020 08:14:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 29 Jun 2020 08:14:01 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id b25so14840749ljp.6 for ; Mon, 29 Jun 2020 08:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HAaLXkXtYUtfn0Oa0+V7J10XwpxSftqfWEzUE8Sai6o=; b=H7zBmj4z49Kb2gInM3DZDKKl7nU9L3faMZ6G/4/v8r52a6fZmG9Wo53SswxS7aVSUE djTMEsC5yHY052y3GpzPcNSIBgm3J9moPsc09i3dJTqxwD9eMUxS8ZhHA40uTdM37z0p Bcl9i4NMRDZsRbgVHgbMiLrGL8D9DSzLTFVWPyUJnzHUWJxZQUCJhAQ+bn3D5Lo43fyi 9VQQ+db+kVb/NoYFP7NRpW07mNluj2YoWc6pW3gwqA95wT/DDQ1V+o3S61ZvYwq4UTti OlMFNr5okIMf8bFM+fOocaqkiH5wu9/nKhBE4G/PaBzj9zHlMgGmgsDaDOkq84qMRAzY +7VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HAaLXkXtYUtfn0Oa0+V7J10XwpxSftqfWEzUE8Sai6o=; b=KvcWJ0454AjVKvV4pIqhB3zFieP+AG0wehizTjfdm954E4kLGVeU7nJgO32/WL/XHn 3ZksQo85kckp2KYK2m4LhuQ0h6vWHt/q9x2PlLAiXV2a9bEKW26arnQjoYU1sk2lquc+ o5WaysxW3CUhd+Sz168fHUxC5i02+tQRZCak4MnLLzTD+19cv8mj4vUbPe5G7AjRL5Ym g1xLyq63yKCUJUYn0KGF4gn+2jGu0r9PCTLB9VfPciMABJq+tTAGPkcY7Q5tnU6wnYCl +GWpTjMZzat7hrSfTeaA1pGKcA0+43qf7NYXpGikZltBj11aqMDcxmNg6IRVRhd6yXIb LDPg== X-Gm-Message-State: AOAM532WvCqAAMcw05OfVJFypR0xLRvW0y+yOdWOE0DB7d9KDZbEB3Tm tRjBXylczsF96S61ZkUVF7VUjqNlbhco1ISZ2bMf2CR0 X-Google-Smtp-Source: ABdhPJz7Vkr+2ruoiJYDzl+b3s+ssbSp9PfLMV7XwoP2ljfRgC1SXqxcSqWFUEQEqenNyp84GpmSEkGw2bgiTrea7Bo= X-Received: by 2002:a2e:850b:: with SMTP id j11mr8164575lji.30.1593443639945; Mon, 29 Jun 2020 08:13:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 29 Jun 2020 17:13:43 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000020ed6805a93a824e" Subject: Re: [RFC] Named arguments From: nikita.ppv@gmail.com (Nikita Popov) --00000000000020ed6805a93a824e Content-Type: text/plain; charset="UTF-8" On Tue, Jun 23, 2020 at 12:10 PM Nikita Popov wrote: > On Tue, May 5, 2020 at 3:51 PM Nikita Popov wrote: > >> 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 >> > > As we're moving in on feature freeze, I plan to move this proposal forward > soonishly. > > I have update the RFC to drop the syntax as an open question (I haven't > seen much opposition to the use of ":"), and to describe the possible > alternative LSP behavior at > https://wiki.php.net/rfc/named_params#parameter_name_changes_during_inheritance > . > > While writing this down and implementing it, I found that this has more > odd edge-cases than anticipated. Overall, I'm not sold that this approach > is worth it. It sounds nice on paper, but I strongly suspect that it solves > a problem that does not existing in practice, and will force us to keep > this patch-over mechanism indefinitely, while the real solution would have > been to fix the limited amount of code that is in the intersection of > "renames parameters" and "is actually invoked with named arguments". > Just as another reminder: I plan to put this to voting by the end of the week. I've also updated the RFC to make the LSP behavior a secondary vote. I'm not convinced this is a good idea myself, but some others seemed to prefer this approach. Regards, Nikita --00000000000020ed6805a93a824e--