Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124750 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 4A7831A00B7 for ; Sun, 4 Aug 2024 18:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722796757; bh=DUTOGgQx60exOcVuUVBp1f5JE6yLZOXyAjiau2yUYF8=; h=Subject:From:To:Date:In-Reply-To:References:From; b=CT2w0pEyShxExAFgQiytGX3n+fGrBGKZYObCHG+S5Gce0RRHfrmSotxi6KCD/+isL BhPKBNdJFKNVf5TfR0pmhD6TGjOSNwr+xv+CL7m6Ehhi0m/Z7IJjdB33NMBcTI7c5v /B3PulXDlzGA7IksA1LWsiDFZObCzoRDcu8knG4/jXooW5tzVjFgFBYcXrbjTmw0XC aVZ0ggOr4LTxhYunm0VU3LtqSSWhGQWcM0in/CR14ARwGsxz/X1xw9EvT8CZJ+3dJH L/N60WkeDyXFK9lHL7hQ4ewQLZNhBnfX1ti0/e8j/gkHleNVJKWrBImqh73ujko8ZE H4OSFyDMxXp2A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2706918005C for ; Sun, 4 Aug 2024 18:39:17 +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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from ageofdream.com (ageofdream.com [45.33.21.21]) (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 ; Sun, 4 Aug 2024 18:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ageofdream.com; s=ageofdream; t=1722796656; bh=DUTOGgQx60exOcVuUVBp1f5JE6yLZOXyAjiau2yUYF8=; h=Subject:From:To:Date:In-Reply-To:References:From; b=u4sTcO/qbYS0HAL6szclu8nYzhMJ2PPNNizTbjGzwStxYTz0YlPwnVUswjMLd/RBO SA/rWblM9ZfxExBeBl0nVHYNZVC9GkIlXGJOz7LrqynuJmolZSiI+94RJH9+9dUkvq /z9N3C7U7NQMEDgnoLj2KWeSF8tbeXeNoqPKLGTREjyvk2XbDF8Tnvybp+ntv9mukL mryCgsidlB5UVVwxWTurxGXebombMqJWTL8CJcJd/kiyvB9kaUw3uVpo1JFswBInXh Rx4Cyh32Qn2EcucH2Ai5kHuax+8EzkL4vu2ITLbCaQTrX7pNgFr564TPJeNGFfnBNd unL8iy8hS1/8A== Received: from [192.168.1.7] (unknown [72.255.193.122]) by ageofdream.com (Postfix) with ESMTPSA id 01DE227985 for ; Sun, 4 Aug 2024 14:37:35 -0400 (EDT) Message-ID: <9c795377ff0983cc10bf108c68b12c0a1a693cc1.camel@ageofdream.com> Subject: Re: [PHP-DEV] [RFC] Add Directive to Make All Namespaced Function Calls Global To: internals@lists.php.net Date: Sun, 04 Aug 2024 14:37:35 -0400 In-Reply-To: <53d4d4235e45fbe471179f4b95207a73890e9384.camel@ageofdream.com> References: <803741ef-7b51-4a92-8368-41e47f7783ab@gmail.com> <53d4d4235e45fbe471179f4b95207a73890e9384.camel@ageofdream.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 From: lists@ageofdream.com (Nick Lockheart) > My thought was that it would have some clean and simple syntax, like: >=20 > namespace foo using global functions; > class MyClass{ >=20 > } >=20 > When the parser hits that token, it just sets a flag and acts like > every unqualified classname has a backslash in front of it. >=20 > For everyone else: >=20 > namespace foo; > class MyClass{ >=20 > } >=20 > ...would still work exactly the same as it does now. And would keep > BC. Edit: Meant to say "function name" not "class name", sorry.