Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116599 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94587 invoked from network); 9 Dec 2021 08:19:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 08:19:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F27741804F8 for ; Thu, 9 Dec 2021 01:20:04 -0800 (PST) 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.2 required=5.0 tests=BAYES_20,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-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) (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, 9 Dec 2021 01:20:04 -0800 (PST) Received: by mail-il1-f177.google.com with SMTP id 15so4735629ilq.2 for ; Thu, 09 Dec 2021 01:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mF8uvs0rwcSLe67ceeXQL+aoMsoguDn9+7/x2De4ywk=; b=aanE68hERr10mIQTG78NwQoHVdBQDKG/Si/D9yAduFGJVA82oDiDUYazAztradY2Rt SrS91ifJpx9hK7EOCll9TurAptRnDjRiWzCgE2qx/nZTwpw2yKlfgTDVs0RXMH8siqHf 7wp8aFtMcbQUv/riUOaXotaxUpOIy6w0xX4fIrNa8vKW8f9fE7/qTP4oMpRaTiVTwju8 9EUoKZtkZhqdo55rDxUz88N40KdfCLLn6dUyLgIHGM08NGhrLU/TFfSJHTk754pnKlHn ltOydZq7lD1wgMpLWuso2A/h3P+pyuLQgPevEMGkS1x+uLPgC+ulwbQd1OlNOlGi3tsh in7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mF8uvs0rwcSLe67ceeXQL+aoMsoguDn9+7/x2De4ywk=; b=cD0xDy3HhL5BZZcAk7u4Ya7z33tv93lM+Of4ZjBMqWFjx4uxVJxR0QkRubzO4tEGSi BxtpfnLDQkQL02T4fOqlFLdGYMGLEvdALeN/XL+751BLsbnlstXbuqmNkY0qw6t+zOlg vRa4POIWO2INGsfBKLScfv9ZtySM21KQTWqic1LozVR4TA9UQqQ1nu9eBVnYuPUGTyuj lg6uJOppkeqR64BSkGOSAgLl9E5Oe+cg105ZWt4u5vDOnRRc9ZglJ/2sz2onJ8za9NIs 4aPc/szb3MCJkyqTw8+ufuqEOovjH7hMO4T2VbxjbdEJd2rFySprqFxCK78ls3ZjxiiD tktA== X-Gm-Message-State: AOAM531WWXvsSbw3rvEec1cYLDmf8U6ofFoHzP5F/IKrrQ4r1xPKTC8Q msQZSxRz6EWaTPG3fItAuVxw9RCmhUXZ6a4ZsvKL/im9 X-Google-Smtp-Source: ABdhPJxU2ZCjHWaH9uGvifEl+B7XIoZYNDSksBmCIHNI0cp8t7uLE8qSlwGRfrZFV985er4YF4ilzvk8kAxUUccYBwI= X-Received: by 2002:a05:6e02:1605:: with SMTP id t5mr14873081ilu.233.1639041603509; Thu, 09 Dec 2021 01:20:03 -0800 (PST) MIME-Version: 1.0 References: <02ba01d7ecbc$c0e13370$42a39a50$@webkr.de> <61b198a6.1c69fb81.e6b7e.7577SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <61b198a6.1c69fb81.e6b7e.7577SMTPIN_ADDED_MISSING@mx.google.com> Date: Thu, 9 Dec 2021 10:19:27 +0100 Message-ID: To: Mark Randall Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008ca41505d2b31cb8" Subject: Re: [PHP-DEV] Re: Allow default parameters before non-default ones? From: deleugyn@gmail.com (Deleu) --0000000000008ca41505d2b31cb8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 9, 2021 at 6:48 AM Mark Randall wrote: > On 09/12/2021 05:22, Andr=C3=A9 H=C3=A4nsel wrote: > > This is very useful because I can add an optional parameter to a functi= on > > and prevent users of my function from using the parameter in a position= al > > way. This way I don't have to make a compatibility promise to never > change > > the position of this parameter. > > > I would much prefer we could find a way to give this proper support > rather than a hack. > > I frequently use large numbers of named arguments and would very much > like to be able to knock out the ability to use positional arguments, > thus ensuring I can change the order (e.g. inserting a new argument > after a related one) without a BC break. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > If this were to happen, would it be an attribute to be added to the functions, a new keyword to declare named-parameter functions only or a different way to declare parameters? Are there other options? --=20 Marco Aur=C3=A9lio Deleu --0000000000008ca41505d2b31cb8--