Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110901 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75607 invoked from network); 9 Jul 2020 18:12:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jul 2020 18:12:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 08BDF180542 for ; Thu, 9 Jul 2020 10:04:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 9 Jul 2020 10:04:03 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 242855C0125 for ; Thu, 9 Jul 2020 13:04:02 -0400 (EDT) Received: from imap26 ([10.202.2.76]) by compute7.internal (MEProxy); Thu, 09 Jul 2020 13:04:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=9SiiE9 SvtSPZA1BFu7w1rMNo8BfaMvGde9/C85ntOlQ=; b=SPYhiMBSpwSjL4c9KujN9W KAf+LBMS/icFYxEdUnm2AhWygPmTV+6ubmEJ/xB33ZV2aiy+20UNlciK6mmp5o9Q y6kwGHDQPGoQLfnKDZNjH7OA5AWwmxTmoqBpW3ROpDJtJ91X2oFrEXnPfLJ25wqA z7GwXO5mTh51sHC44UTBfHgA8Z7B5HMIFMLqRT0SfRNJ0ZPPn8np5eRctTts5h0u zE9zobYZ33DUEQs46gNrJFsCROA8JV/4gRA4Q5CJEPdD2C8MCW2EKUvjPLb8cc6B 4RmqkXnDeJrgy+U7V5Ek8LlTgnPoqNrD3jOU8RjCz108b+Dqw/d2xf0hWkq35OFw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudelgdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpedtjeekjefhveegfefgtdettefhueehtdetgffgjeek kefgiedvieffkeekvddtjeenucffohhmrghinhepvgigthgvrhhnrghlshdrihhonecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhies ghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id BC63314200A2; Thu, 9 Jul 2020 13:04:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-dev0-613-g8a73ad6-fm-20200709.001-g8a73ad6e Mime-Version: 1.0 Message-ID: In-Reply-To: References: <0771c3ac-53ec-4a7f-a4e9-6ae3c9b1f1f6@www.fastmail.com> <49fd7972-8cec-4207-99af-6c77c2328211@www.fastmail.com> Date: Thu, 09 Jul 2020 12:03:41 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics From: larry@garfieldtech.com ("Larry Garfield") On Thu, Jul 9, 2020, at 6:55 AM, Rowan Tommins wrote: > On Thu, 9 Jul 2020 at 09:58, Dan Ackroyd wrote: > > > On Tue, 7 Jul 2020 at 15:47, Larry Garfield > > wrote: > > > > > > This has reached the 2 week mark, but there's not been much discussion. > > > > Unless I'm having a massive reading failure, this RFC has been > > announced twice. And feedback was provided before: > > > > https://externals.io/message/109646#109647 > > https://externals.io/message/109646#109648 > > > > > It seems that, although still labelled version 1, the RFC has been > substantially rewritten since that discussion. Yes, based on the discussion in chat that resulted in actual guidelines, we mostly rewrote the whole document. I've no idea what the rules are around new version numbers of RFCs that haven't been up for a vote yet. > > From the RFC: > > > Every new global class, however, creates a potential namespace collision > > > with existing user-space code and thus a potential for backward > > > compatibility breaks. > > > > This doesn't appear to be an actual problem for the PHP ecosystem. > > > > The vast majority of code in libraries is in namespaces, which avoids > > there being a problem that needs addressing. > > > And yet we have repeatedly had discussions about whether this or that > feature should or shouldn't be prefixed with a namespace. If you think the > correct answer to "when should we use the PHP\ prefix?" is "never", I urge > you to put forward an RFC making that the policy. > > > > Rather than having more rules (quite a few of which I don't agree > > with), time and effort would be better spent on reviewing code and > > using features before releases e.g. to avoid situations like the FFI > > api being difficult to use. Which guidelines in particular bug you, and why? > > This is pure whataboutery; the idea that reading a few naming conventions > will be such a burden that somebody would have no time to review a feature > is frankly ridiculous. Nor will the lack of a naming convention mean that > no time needs to be spent naming things - quite the contrary, it will mean > more time is wasted debating every case. > > It's worth stressing that naming conventions are not new - we've had them > for global functions for many many years. We may talk about "putting things > into namespaces", but PHP's namespaces really are just names, so this RFC > could easily be called "update naming conventions for classes". I fully agree that this is a why-not-both-girl.gif situation. If anything, reducing the time that gets spent asking "*now* can we start using a namespace?" will open up more time for people to actually review APIs. Although since those are two very different mindsets I doubt that there will be any impact on available-API-review time either way. (That said, more time and attention paid to developing clean, usable APIs can only benefit PHP.) --Larry Garfield