Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116598 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 85102 invoked from network); 9 Dec 2021 04:47:39 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 9 Dec 2021 04:47:39 -0000 To: internals@lists.php.net Date: Thu, 9 Dec 2021 05:48:15 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 References: <02ba01d7ecbc$c0e13370$42a39a50$@webkr.de> In-Reply-To: <02ba01d7ecbc$c0e13370$42a39a50$@webkr.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 87.81.129.66 Subject: Re: Allow default parameters before non-default ones? From: marandall@php.net (Mark Randall) Message-ID: On 09/12/2021 05:22, André Hänsel wrote: > This is very useful because I can add an optional parameter to a function > and prevent users of my function from using the parameter in a positional > 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.