Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124659 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 291DA1A00B7 for ; Sat, 27 Jul 2024 23:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722121964; bh=Ng175QBrxAVSWYYsOa7NOtw3604IHWyO65RpLykIFNU=; h=Subject:From:To:Date:In-Reply-To:References:From; b=dU5IhKsbLnkqNY+CWqLIdeHqJ+crkgn74WO6pxXJbjHWAXSTFo8N1yYV6zSMkp0AH mewhrvsW6vPF5QCBmOW1U/WS3me2ZNXg3wg2/UiKNBqaHwZTfL6pio9AJxJO+Z47Hd jDOp1W/t6EC/ZHMHfxXUhpm4wHFiaxS3d3lyhRICAj5tE2LfWWyGVKaINpDbd3kA/G 0b6m9JrsyhyiFBG/sZ10CxkNUjkM5cwxxbnDF2k1zkCfybB706k6e0R18BGgpSIDQ1 IEevVhkG9F3rbAwPrcmd/TL4z4h8qzpsSRUda9et4V0yL8xK14+ADeCOZhm1ljuP84 5m4noHMR/IKKA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E917B180039 for ; Sat, 27 Jul 2024 23:12: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.6 required=5.0 tests=BAYES_50,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 ; Sat, 27 Jul 2024 23:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ageofdream.com; s=ageofdream; t=1722121862; bh=Ng175QBrxAVSWYYsOa7NOtw3604IHWyO65RpLykIFNU=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Yvmr6eRnQ1jDl1bHScKO/akQ/3aXClK6i+PQoTDOKCE+TGD1FApBufYhDvA1y0h1G m4bMSTbpLdBRFv+0HHbJhllDtv07Mz92zOlNsgSlVZ6w0QZg4bBYKtYgjHtvQgddDI lf9Xc16Axb6JhEmHZJhYfW/JhqsYKxvDXTVQ/3NwIrWk1XEdzkThDSxQ7en5Lb9ull 51gN82QqRlel+NQDFdeOQ0kSwGY3aRSpsbzdneCRr8eNQrIz/sx4HNsFK1DG9rRPi+ KggIXZGIKA+0cqq3Kifn8vdp4Lu0w1TD1QwyXRUheAzpLI9pMtbE6BVsM1dOgEjk+m AUoxRfFuTjIMA== Received: from [192.168.1.7] (231.subnet-69-85-112.ellijay.com [69.85.112.231]) by ageofdream.com (Postfix) with ESMTPSA id 052DD2798F for ; Sat, 27 Jul 2024 19:11:01 -0400 (EDT) Message-ID: <630b4e1e452d40e5f807d155cf97a10550ee4dd5.camel@ageofdream.com> Subject: Re: [PHP-DEV] Should PHP reserve a namespace for built-in classes? To: internals@lists.php.net Date: Sat, 27 Jul 2024 19:11:01 -0400 In-Reply-To: <098864EF-9D75-417A-82DC-105082DA3A23@gmail.com> References: <76559a9cd5eca4bc6799ed9612ce15c28cd7cb0a.camel@ageofdream.com> <95f6046a-4acf-4f8a-a850-a23650c0c6b3@bastelstu.be> <927705b0404e70b0f0ade4a3354b2598d7c112f9.camel@ageofdream.com> <86b7e340-6ca9-4b3c-af0a-a5c2d1ee68c3@bastelstu.be> <098864EF-9D75-417A-82DC-105082DA3A23@gmail.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) On Sun, 2024-07-28 at 00:48 +0200, Claude Pache wrote: >=20 > For the case of functions (and constants) in the global namespace, > there was an RFC on the subject about 4 years ago, which has been > declined; see:=C2=A0https://wiki.php.net/rfc/use_global_elements=C2=A0and= the > discussion threads referenced at the bottom of that page. The top of the RFC correctly outlines the problem; a problem that still exists. Maybe the proposed solution wasn't the best approach, but it still remains an issue: Classes that are built-in to PHP are and will cause naming collisions with developer code. I think the C++ approach is simple and elegant: using std::string; The C++ standard library will never collide with user code as you ask for it when you want it.