Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125242 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 6FD5C1A00BD for ; Sun, 25 Aug 2024 21:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724621620; bh=FvI5N1cOzRTXTpajj47OZMyjIZ/GuDT1vgSDBOQlhXw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=AajPrLcZuRviHW2/ut1KOsl0DdBrGQE9uzZ2hzGpIlc+wJKSNKbPpE57E1Dw1pJRk Q8x8mGM10WPw4a8MaZt6DRcUeTIVW2UkdjahNaOdIgORtCYTF4ZrU/XNFRR6C72Q7r QUwckwJ/nDKoXOJ0f6Cm6Xk6VznKNzi6MCc8frIh4bVcuaLOOmhoCyTBO3W4hF+dhb lNtxtpztyT8HWokGsyGNL8W4He9Ff3wbLjXifXoIQpIH86C+iKFCouWTTZyEKxgTIb 8hnU4tqlVecIfyLK96xalDFN/HdbwVrMCoDgek63FYVwKDWMm2pR6Bqdd91os91c3k qzSgMxZzdEvtw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C5BEE180076 for ; Sun, 25 Aug 2024 21:33:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 25 Aug 2024 21:33:39 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 6E766138EC5F for ; Sun, 25 Aug 2024 17:31:46 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sun, 25 Aug 2024 17:31:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1724621506; x=1724707906; bh=FvI5N1cOzRTXTpajj47OZMyjIZ/GuDT1vgSDBOQlhXw=; b= SaiL7V6nryYSvcIGpZrJRyCFloc+gi7FjVT91YwkDChB5MbxbFDrEzoLrjw6AbYW u1EDKr1wK08lYObmY4n1ygukQb3qJNJmjtdPeihRoO5Yu1OjFYYa8lR2fI0nQtus OnpmbR6RZxhlLr924JzEAqlNyxeNrS1CAzTp+aUExbF6MIA0fk2RptIzR98PrlaY 9qZNWjhZGb4t3btUyt8XuV1mtnkJ2uJ3k6IbkMz72Q8KqHcBhcE259FT89eezuu6 nAsun7nlkviCWIMNksgIXVuSRGrxiAK44PYPuDL7NMMIRFZsndpHR6NGNsX1BGWA +4dUDJ9QZgOZ9nSFUIsCpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724621506; x= 1724707906; bh=FvI5N1cOzRTXTpajj47OZMyjIZ/GuDT1vgSDBOQlhXw=; b=W 4/uKgOFZoqCPii4J0MODSQ/ioVTt4xH7oMkLYCMnuqhyq5ktE+Q+BS6AR4SdRC0n z0jWV6eNTJqrxdr0Sds3HRYlF5gbiJ3Kkie0UL34FaUqs94wm5cOgXdyWyVO0Hxy IKKSjfkJ4/FiESiq5SM8ojuvWnUbEHMZwYoKk5SG3UAMPheynBXvRrwkk8rnVIzf kZEPgnp8fzNQKQEoFUu74g3xXvp2B3n+Y04M2ZAhcP67DSflsLimrh89SoPztSju 1z0jiOf27swAT3IqttDlstng3Ws6oCrMNdIl3Sh2ySDG9AOETUnf1u3z67CBlC+b hJL9CgzKzcN+1W2Xb3T4g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvjecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffrtefo kffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffufggjfh fkgggtgfesthhqmhdttderjeenucfhrhhomhepfdftohifrghnucfvohhmmhhinhhsucgl kffoufhorfgnfdcuoehimhhsohhprdhphhhpsehrfigvtgdrtghordhukheqnecuggftrf grthhtvghrnhepheelffetiefgveduteefudegtdduveeludegueegleehiefhhefgtdek veevgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epihhmshhophdrphhhphesrhifvggtrdgtohdruhhkpdhnsggprhgtphhtthhopedupdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrd hphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 25 Aug 2024 17:31:45 -0400 (EDT) Date: Sun, 25 Aug 2024 22:31:45 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Default expression User-Agent: K-9 Mail for Android In-Reply-To: <9F07D1D1-E539-4F23-94F2-8957C2AE7A5E@zort.net> References: <0c8ed5d6-5507-4c41-8d7f-05d14ba8aa4c@scriptfusion.com> <0cfd3a28-3cb0-4478-85fb-cf086d8e5c66@app.fastmail.com> <9F07D1D1-E539-4F23-94F2-8957C2AE7A5E@zort.net> Message-ID: <4DE13F46-487C-46AB-8C9E-86F6920AD8EE@rwec.co.uk> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 25 August 2024 21:29:45 BST, John Bafford wrote: >This is only by current convention=2E It used to be that parameter names = were not part of the API contract, but now with named parameters, they are= =2E=20 Indeed, and it remains highly controversial among library authors, and is = even used as a justification for this RFC=2E > There's no reason default values couldn't (or shouldn't) become part of = the API contract in the same way=2E I agree that they *could*, but I am making the case that they *should not*= =2E The ability to specify an optional parameter which is subject to change= is a very useful one, frequently used=2E If a library author *wants* to ex= pose the default value for manipulation by users, they can make it availabl= e as a constant, as with e=2Eg=2E PASSWORD_DEFAULT=2E I can definitely see the use in features that enhance the existing use of = default parameters to mean "I trust the implementation to do the right thin= g, and am not interested in specifying this parameter"=2E (And see my earli= er post on how bit flags can still fit it into this meaning=2E) None of the examples so far have persuaded me that there is sufficient val= ue in extending that to "every optional parameter also acts a public consta= nt that the caller can read out and act on at will"=2E Rowan Tommins [IMSoP]