Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125270 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 281B21A00BD for ; Mon, 26 Aug 2024 12:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724676330; bh=7jSwxZjXpb0WOzUbwaPAf9MJKIxwcZbSPqAlfuQkf+4=; h=Date:From:To:In-Reply-To:References:Subject:From; b=LzeJkWFfXFGlKwPidIHceYPoX5LsBjUWdppTJValqF+K5RTuOjalufTNrHl3vNCCu 1bz6+D3M/m5J9Mg4/BlFBO5bkb09uCxShZNAuXeibIrwSdjFvCaze3vx93LDlt3Gm4 hwLX+rQZtbGH0Uefpb3OS4xqRwRCDk22mM3jpyYsae8V4BlTsmPYzX4vsi9MJ1rn8o UKGqEgFgYFq2paXFEEe2FjQAS77GyGzG1owQMWlTL8uFDBMBWpZ2KUmEW5JJjlVEAI pUpbKhB4eLxr2r+EnUbFYBFfA3kXDCBtEDavVeZGFb8hC6zEQvdNBbHdd2ZMLlXonU mu5tQoZk3pgbQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2DDAB18005B for ; Mon, 26 Aug 2024 12:45:29 +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, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh1-smtp.messagingengine.com (fhigh1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 26 Aug 2024 12:45:28 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 7CA29114EC82 for ; Mon, 26 Aug 2024 08:43:35 -0400 (EDT) Received: from phl-imap-10 ([10.202.2.85]) by phl-compute-03.internal (MEProxy); Mon, 26 Aug 2024 08:43:35 -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=1724676215; x=1724762615; bh=9PPqEMHAztFqEEBV6dBg6/1dg+v1m2q7rr5XhQ/li2Q=; b= RmbiR9PEOM3pa/LXOPVtREEgWxREwcCg7IKxENP7WhPGgjvEYzNq+4TAjBLh13Iw RNFklkrtJ2qungJVRtcpft7Qlgl1IorF9XPN4EzQ21F1SUDP67DUMDKaWBAcm5m+ dxwkJ4S+1F/4S7/kC24Nm0BGSAffd3KK76clpVY0mqEX0E9Isa42zescW5XwqZ1R 5r/LeWANzVNTWt7v7XgvRnWP8frrM98X1w4taxL6KJZDxCgqOoTlev4Wo3rncbfe 6BWT8U7ZT2Biv7PnuqSOeFAH5rWvSYRgSN6Hmp3UEI/6O/ArBTMgqXLOegnxyAKj hf/PWcM9zSBq1c/tcnudug== 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=1724676215; x= 1724762615; bh=9PPqEMHAztFqEEBV6dBg6/1dg+v1m2q7rr5XhQ/li2Q=; b=t XTpWPsqFNnLH5YSA4sfS9HwqBgHP3maLhMW8y/uCZd6zYkHdqLWaFH4Piaqvibdv 4jjXBgT/czi2fMlGg9yYOKcxYkp8eRkkz0a+ZkLNItltL5HTc5T3pEryuOM/t1tH ki3FOG0tieg6C5ntDEB7DN6TrqZDRw8gMCldocXVzLtcWHiNEqI27IxJq9Jr5trR e8VXCFLemLnsKB9OhkJRZdE8gsdAA3wWgAffhPAB1hiMPrZtzhNuRvsZ/7ZAdo9N 9HSKx8A/KNd6MM4hnqMkxpEA1lpPHJDijyQ/nbUhBT5MN+PKR838GecYiwyarYlo 392iU/sGWwvC2a5YjGMOg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvkedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhn shculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenuc ggtffrrghtthgvrhhnpeevjefgvdehffeuudelgfeutdehteefhedtffdthfetvedulefg ueeiteelffeuvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohep uddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhish htshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 31E663C0066; Mon, 26 Aug 2024 08:43:35 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 26 Aug 2024 13:43:12 +0100 To: internals@lists.php.net Message-ID: In-Reply-To: <07E4ABD5-B9CE-47FA-BD9E-E42A82CFC737@newclarity.net> References: <99846F78-38F8-4549-B0A6-6310933AA78D@newclarity.net> <0B974990-05FE-4C46-9C2B-3C243C7E8E81@getmailspring.com> <07E4ABD5-B9CE-47FA-BD9E-E42A82CFC737@newclarity.net> Subject: Re: [PHP-DEV] [RFC] Default expression Content-Type: text/plain Content-Transfer-Encoding: 7bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On Mon, 26 Aug 2024, at 11:43, Mike Schinkel wrote: >> On Aug 26, 2024, at 3:28 AM, Rowan Tommins [IMSoP] wrote: >> I was responding to someone justifying anything and everything the proposal allows, because Reflection already allows it. If the feature was "first class syntax to access private methods of a class", I don't think it would be controversial to challenge it. Saying "Reflection can already do it" would be a poor defence, because part of Reflection's job is to break the normal rules of the language. > > But saying that we can be certain default values are private and we > want to keep them that way is provably false by the existence of > Reflection. Sorry to double-reply when the thread is already quite busy, but I overlooked this sentence, and don't want to leave it unchallenged. By this reasoning, any property or method marked "private" is actually part of the public API of a class, because it can be accessed via Reflection. Perhaps we could add a "sudo" operator to make it easier: class Xkcd149 { private function make_me_a_sandwich() { ... } } echo (new Xkcd149)->make_me_a_sandwich(); // error echo (new Xkcd149)->(sudo)make_me_a_sandwich(); // OK, here you go... I'd be surprised if anyone thought that was a good idea, because people are generally quite happy to separate "is part of the language" from "is possible to do if you mess around with Reflection APIs". Right now, accessing the default value of an optional parameter is in the "possible if you mess around with Reflection APIs" set; maybe we do want to move it to the "is part of the language" set, maybe we don't; but claiming there is no distinction is nonsense. --- Rowan Tommins [IMSoP]