Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125448 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 4BC851A00BD for ; Fri, 6 Sep 2024 08:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725612609; bh=4RIeOOMT1KfHxMW9/sEOPnX5o7T15WvMulNTARkpEc8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=eVAozKa5xVAOW5SyxwH5cVzq+er2JZLgq+9cAwwW9mm/OBQh85ksn53Fwm+p5uR7S 7a2QQ6YtRL3tK937dz91Hs/7QlxL+5cvGDNoMknmhSeoYVv97w4I0uVrPPS/txyV68 mdpxm0YBEMaZr/3Ckwo/GGsVdOhlkEuxcw/vifznAoB8qaV5oWkcOi9b3RYarj4Y7N LhM9XuFOaH+VDAB+gm4QgSief1luCuZ0ZCp6q/SAw3fDFX1nfqff9H9f0gkryI2tER sUmQzmru/+g1O8kukD1bJ51rbT2PR76KpLO0vUGwtrey+q1b0NpMuS088RZmz+NqM1 S2R9OeQfkPkTw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C838D180055 for ; Fri, 6 Sep 2024 08:50:08 +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 fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) (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 ; Fri, 6 Sep 2024 08:50:08 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id D70041140345 for ; Fri, 6 Sep 2024 04:48:08 -0400 (EDT) Received: from phl-imap-10 ([10.202.2.85]) by phl-compute-05.internal (MEProxy); Fri, 06 Sep 2024 04:48:08 -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=1725612488; x=1725698888; bh=k61kmUdLpwjEp/J7IxknAY/gPnqOIJ7kFxbz8QHgcRs=; b= Fq8R+mUQuaj2S90Brrk7RNh7k3KKlrRXHBz+N3bclGjzNJpd5IQ54go1X5THwmAH LgIYTxLTX7ArVDlmIxd+9nN6ww9Aautgr6zcYtRdSIlsSoYRzGxSIhGDWtw43KKF GwTLetdztsgy9qlQC6+CO8TkooXiNbGX2HNINwA7uDI/c1mAqgORRi7GpAOm+GKC kPsc+jCBHVkOVs/LX9v1nHIqltza5WAXCztGi/ZttwRp4qpTnrnZ6+C1J7OIdO0b zlM3zhuGTZgaCSwVPiICslG7mwE/um6xVBU8FWKsYv3PmpVoMPCd+Zs5DmXV/9IH HXbIzqXV0pRLRSxtgLdhuw== 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=1725612488; x= 1725698888; bh=k61kmUdLpwjEp/J7IxknAY/gPnqOIJ7kFxbz8QHgcRs=; b=i CfAkWf8hQ5vWzKmZQ6sMAwi8KdPrAUwV0T/JTVmvsqna3RO78l/u+TmvlgVBxm3i fRdxNiLBkpJhGCadnnpQquvHalTxyNjFCjRSyGErtVxq46Q9WDjmSAuZ71hqZ57i vBu8doJ/oKAfMB5nsKpE6yRv588cuYdEymIQ4QKWbo6/DKX9+ptUuzpusojnojv4 uo5toPaN3TgsTgObS4PRk57PJnpoPlpPhuktwpmLJYJYKVjZdtbX4sPwfF9fRTZZ nTIU0WQE/9/cqjAMOoHVPMepx3LLjfCzWWzhBfEdJ4LOGranOT0hdRiLuoCMtug/ xqRBm8kg9ZZCcpHNpnNCA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeiuddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhn shculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenuc ggtffrrghtthgvrhhnpeeileeihfffffevgeehveevvdeiteeuvdegudejieetkedtgfdt gefhhfdtlefgieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohep uddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhish htshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 85FA63C0068; Fri, 6 Sep 2024 04:48:08 -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: Fri, 06 Sep 2024 09:47:07 +0100 To: internals@lists.php.net Message-ID: <5d6f5a8b-05c3-4519-b5e0-1c8c51b9d626@app.fastmail.com> In-Reply-To: <9045A1B9-2880-4FB4-88F4-1AF7EBF0F3E0@newclarity.net> References: <27c3909f-05f4-4256-a447-10e8d8760fff@app.fastmail.com> <420bb5cb-5fca-4f2e-8c68-0ca327cd3392@app.fastmail.com> <7A98532B-7465-4FC5-B7A9-993E7D430EE1@zort.net> <94510a5e-ae23-4118-ac55-2e90c911e7da@app.fastmail.com> <77C2D2CC-5E1E-40D9-9FB3-A5C4A6311669@newclarity.net> <9045A1B9-2880-4FB4-88F4-1AF7EBF0F3E0@newclarity.net> Subject: Re: [PHP-DEV] Local constants Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On Fri, 6 Sep 2024, at 03:01, Mike Schinkel wrote: >> Block-scoping doesn't have to allow shadowing of names,=20 > > How exactly would that work? Are you suggesting to restrict the use o= f=20 > variable names to one per function but still allow for block scoping? Yes. That's how C# works, for example - variables are scoped to the bloc= k where they're declared, but each name declared must be unique, not sha= dowing one that's currently in scope. > Shadowing is not a feature that is added, it is the result=20 > of block scoping, AFAIK. Shadowing is absolutely a feature that has to be implemented: the compil= er has to store some "backup" of the old name binding, so that it can be= "restored" when the shadowing variable goes out of scope. Without shado= wing, it's instead about tracking the "lifetime" of the variable, and re= fusing references to it outside of the block where it's "live". I'm sure= the implementation of both versions varies wildly. > It is ironic you say we should make sure it's possible before we=20 > discuss if we want it. I know I have heard the opposite many times on=20 > this list =E2=80=94 make sure we even want it before we worry about ho= w to=20 > implement =E2=80=94 although I cannot say for sure that it was ever yo= u that=20 > said that. You're right, there is some value in letting people know that a feature = would be popular if implemented. I'm just aware that threads like this c= an quickly grow into rambling discussions of wild ideas with little grou= nding in what's possible, or back-and-forth debates between two people a= bout something completely hypothetical. When that happens, those with th= e experience to actually implement big new features tend to tune out.=20 I will now try to practice what I preach, and not post further in this t= hread unless it moves onto something more concrete. Regards, --=20 Rowan Tommins [IMSoP]