Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110708 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28767 invoked from network); 23 Jun 2020 11:23:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jun 2020 11:23:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6CD931804F4 for ; Tue, 23 Jun 2020 03:10:22 -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=-0.7 required=5.0 tests=BAYES_05,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-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 ; Tue, 23 Jun 2020 03:10:21 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id i3so22772599ljg.3 for ; Tue, 23 Jun 2020 03:10:21 -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=qmtGTlxITIsXkCIM/UWCxRxzvX8D2WCvuofKxZ9MumA=; b=NkkBRlu0M87/IweDiJ2VmXxsDR9HfgOHY302y5snHYhxNLyZX9pkbT7Ui0AUUdpg/L 1X/+9lH7Be2TgmozvkQMtEHL3DrdTep2sJWWb5PErVgvw4Q3AQPS2A6CToTypvXxLbNT 5Ml3u3aF8n5PmISCkLOqwJLG0uW/iBldCixGtg9AGi/alZa7WAQhT7rjq8hXXj1bx0eA q9Dkvtr/IsufocxD4kshMZcy8KV87AA7HjDRmtFMgyevgwfjRdwqgBMD+TvTlcH1JYYs gmPgtuyL994JNFLClRc3kcfXCD6Kf85XJdzfV+Xh9Txk85TM1ppDVKhQWLXiN3zqqJ92 Wfng== 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=qmtGTlxITIsXkCIM/UWCxRxzvX8D2WCvuofKxZ9MumA=; b=X+fU1Pqvqshrpbkd2bMWzSEs0KiUaC6K+H+3HN7p6WyGJAoeZB5OpvbPxB9tYCKNyT j42gCxcKUfdZNqooO2sVtJEc5iY4BNnVW+ipE/hiFiRv7O5lrfNcml8HcgxDrjUC106w S25T9z0GgLaCOMTDBwdfh+jXzZNfDmK+MKKytL2LPAL82pD6AwAm8tBLxJCbkhAf/3Ux n9NN+Vo724YkF46SyR9vn4TRXb1V+/+8UfkQi/0cxU3w5gm4z8A03MyimfeGPyj1bZCO rCns+CFXCi/dNSORXcZtUzVktA4inwO/3np0i3Y55DfKiCZtz2RH0PCZqLcMLZGLXG55 Zmaw== X-Gm-Message-State: AOAM531T1kFimzua4NV+IiObhvLPnn7d+E5WgDr0Z5on46WRelWUWJe2 pm4pbXQCB0RFt37AGc4T40WzQ0R7Tqgk07Xc/F3xfgAmF7XR4w== X-Google-Smtp-Source: ABdhPJx8D1sBNe5Rdlwf6O09+QsVYuIr1K5MSslRgOmXwlit7O7jpQf0+DLHS+6kUq9GKRwBcYb5WLPtacwRiCHqr7w= X-Received: by 2002:a2e:5c47:: with SMTP id q68mr11520561ljb.30.1592907017892; Tue, 23 Jun 2020 03:10:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 23 Jun 2020 12:10:01 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000f6391705a8bd90d7" Subject: Re: [RFC] Named arguments From: nikita.ppv@gmail.com (Nikita Popov) --000000000000f6391705a8bd90d7 Content-Type: text/plain; charset="UTF-8" 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". Regards, Nikita --000000000000f6391705a8bd90d7--