Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114810 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84101 invoked from network); 10 Jun 2021 12:59:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jun 2021 12:59:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 176701804AE for ; Thu, 10 Jun 2021 06:14:34 -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-Virus: No X-Envelope-From: Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 ; Thu, 10 Jun 2021 06:14:33 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id p7so3196793lfg.4 for ; Thu, 10 Jun 2021 06:14:33 -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=1dTS78VuaPRGWKbx69+v+j3GF3CgCkyL3NuL8is2umc=; b=B3fpW2KAaGI5RtdTCi7AdhkUXUAEhKUybVQ0yCxt3QAv/Kq4RrkT9egmHfBAEtpe+o JX9A2SOP5LcTEtnJMBZEYdJKUuetuHJ8OsJOY37ZmbRPavo5FZkAebagHzoEefENV+DP Su0pVbKoidLYn81TQlm8LlgXjtTaE1R3/rhPfYvfG4JR5VwnDqlBLNGW/ew5rD9RnfUn 40V9+CtmnHj3PB0hGWohzVacLtJ8o956GwZZFnWMTfIwi0JmmFZf5EpySqjXyoCZzEeG eNH5ijWEX29TXrDXM0oWJHvNlTO/BRaGfCBmY3sxUWJZTwcSMCuU86MJcaZdZ8kZvUvL w1vQ== 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=1dTS78VuaPRGWKbx69+v+j3GF3CgCkyL3NuL8is2umc=; b=r+wVHVvbaomFt3id4PBrQXFz3K0wmpIJx5YURnjcvEQf3xey+PRkSxEYbvBsac3WaU Qz8+u1BqIpxIXgHSDEduDW+LwtFImPbXPoXBt+rvsfi7ua5s6uc1Zb4C8U//gpyDg0Tb B5AMAS+0Vl7vGpezNWrfoM9HQ41omFpNIrQ0QPl+/FHr3Wab3dhgv0SRmnXNN8onKpCf dD10dlvrYSTOzOVBmgfP3umCvB9vA7YKlHZyfjCQX1MLMsa38RS+3LfgRV8ewp3NaIpQ /gaur3DvwYUrWyLtrbtoiZoZzHugwK4CKaFlPhNXBMt6j9AtLHfI8vSB6lDKrE07HyfD Ezng== X-Gm-Message-State: AOAM533QazsBIhEqoPcvFalCYfHYnk7Cg6SGDv23W6ML5GAWusicUGFx OtVu3Lm5buNvrF7P8HZA65UEu2MOApuBv1Oa1g3HUpTFWOM= X-Google-Smtp-Source: ABdhPJw17qFbHjfMj1AbgbGrn88+ITRicj2NnRgp5ltmjWwVM1L2NERdi4OnduMsbwNgZStk+aGFbXCwZqJn9dVTapQ= X-Received: by 2002:ac2:51a9:: with SMTP id f9mr1833727lfk.223.1623330867642; Thu, 10 Jun 2021 06:14:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 10 Jun 2021 15:14:11 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000b804c005c4692b64" Subject: Re: Allow combining arg unpacking and named args From: nikita.ppv@gmail.com (Nikita Popov) --000000000000b804c005c4692b64 Content-Type: text/plain; charset="UTF-8" On Tue, May 25, 2021 at 4:18 PM Nikita Popov wrote: > Hi internals, > > Currently, argument unpacking (...$foo) cannot be combined with named > arguments (foo: $bar) at all. Both func(...$args, x: $y) and func(x: $y, > ...$args) are rejected by the compiler. > > https://github.com/php/php-src/pull/7009 relaxes this by allowing > func(...$args, x: $y). The named arguments are required to come last, > because this automatically enforces the invariant that named arguments must > be sorted after positional argument. > > Are there any concerns with relaxing this restriction? > Any further feedback on this? Nikita --000000000000b804c005c4692b64--