Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123370 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 7D5871A009C for ; Mon, 20 May 2024 15:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716219172; bh=7DMfVKEUKpuh46pMf83MEtsQJO+I5Uh0b4BoBBSDQS4=; h=In-Reply-To:References:Date:From:To:Subject:From; b=I6OwFqg/HrOjhwEFBtdX7mWwtUInlKE9BbeqT6ecwcb4aIyDH6PSyfKLuVYwndsWg fwsIuR0sOed6VEbqf4ecmvEFoUBfI7cNtCsIB3yZst3Oy5HtWYbvNsTvY7ZTV7ikSQ Zec5BWVhndDJ81VHwvWTZrMu6aEVtGCVgNWUV3d9YGcg5HmLME1cgOY7Xm46dj8oXt sDHZ3jqLRcqMrt5uKatlPv7or1nTQ7Ql2rafS3fjXboha4FgHVGU9iGiy0ga6DB1Qv OADV21QytnQDc7PDAnxnOZI4qzxeS3pszTLrSV4FQUboSge7MvnkLdFtYjFMRyQkpx jXKuK+/Qgj/0w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2677118007A for ; Mon, 20 May 2024 15:32:51 +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_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 ; Mon, 20 May 2024 15:32:50 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 48B771C000F3 for ; Mon, 20 May 2024 11:31:53 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Mon, 20 May 2024 11:31:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc: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=1716219112; x= 1716305512; bh=e3Z87viiTsc8fb+Rhy+YYmobiPB6TtBXuMD91wofKQs=; b=A GxjkJ0/BEgO7930DYHZukrzBYRqlsb/8UO0aGlr+GeBmE7grIvSPDxC0JqArOFUc A4JikPKT9EfEfqNVkFMoqPKuMHYlWiSZrTJUBvOHrAOyoYEP5gGiojHWKWJqrb4u UFpH8+YY5L2o5bofwKksRCqpFGLIo7IXHKLtVqbzuZ2T7sfz0hlHAhb0IHO8RMK/ zLjJu5IgKMw/5c8QQ4zXUURWJChUQGQdjS2zN0L/WJFvuy3nS7sshiJ9LcawGi7W k6mCduaIUKzTR0Lxn/8+qpnVrHm3fTd1OAEzHPqqbyuQhWpL7/li9O5VOdnyLyFa tYnf/TYH899CQQKL9IxjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1716219112; x=1716305512; bh=e3Z87viiTsc8fb+Rhy+YYmobiPB6 TtBXuMD91wofKQs=; b=AXtZjhgkl4eierSJrXlxHviSaPzwT1TVhu4aINt5l4lX STFRwGOmeUlZnVZddtKnjoWqD91pzxJXJHHdvUByuUnSY/AjUi8D6JlnLshooDDc kLgUMqe1eXdC84J6/bIn4R8yCtP0Kp517Q0YGNmcYV/qCufwMMHaYMspgFr1lIMz 1R9ZGeEtNg5PWDGDY/mAhtzWJafmWdKVnpXyNiKqYhtTLlLKm6wg6HYphvElXbZy lfVMjv3S9zN9G9p3H1npBoiWkWKyN9n3e2W6iFvSkuXOujsShE0fWZYuIh3xAq1t 8yVptD74+lcft/G6lNPO3HQAnAQutxhJrhQwvPF25g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeitddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 85F641700093; Mon, 20 May 2024 11:31:52 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-480-g515a2f54a-fm-20240515.001-g515a2f54 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: In-Reply-To: References: <407efbd0-2d9c-4bcb-b795-0ee326728415@heigl.org> <864f67fb-01a5-49a6-9f81-b54600046652@app.fastmail.com> Date: Mon, 20 May 2024 15:31:31 +0000 To: "php internals" Subject: Re: [PHP-DEV] [Discussion] "Internal" attribute and warning Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Sat, May 18, 2024, at 6:15 PM, Robert Landers wrote: >> I think an important question to answer here is what we want to have as our definition of "package". >> >> 1. Should the package be defined by the namespace? If so, anyone can put code into any namespace; it's not even hard to add to someone else's namespace. >> 2. Should the package be implicit, or explicit? If it's a namespace, is it auto-implicit or an "empty" package? >> 3. Should package be defined/implied by the file system, like many languages? Then we'd need a way to define/declare a package on the file system. (I have some thoughts there.) But that may run into performance issues, though they could be solved by opcache. This could also make it harder to inject code into someone else's namespace. (Whether that's good or bad is a matter of opinion.) >> >> The proposed attribute would be going with point 2, implicitly. That may be a useful approach, I don't know, but it's not something we should do "implicitly", lest it cause issues for us in the future. >> >> --Larry Garfield > > Oof, I wasn't trying to open the "what is a package" can of worms, > though that may need to happen sooner-or-later. I was mainly trying to > be able to mark malleable APIs and set a conservative delimiter > (top-level/root namespace) for the warning. I think being able to > specify a more local delimiter (working on teams in large codebases) > might also be useful. Understandable, but "easy simple solutions" have a tendency to get in the way of more complete solutions later, or at least cause confusion. So considering the broader scope is important. Like, what happens in the future if we have both package visibility (whatever that means) and an #[Internal] marker attribute (with whatever details)? What happens if the attribute's namespace doesn't line up with a package? Which one should we use when, or at that point do we call #[Internal] soft-deprecated? I don't have answers to those, but we would want answers before we added the attribute. > PS pro-tip: use reply-to-all to email the original author of the email > as well. I saw this email almost two hours ago on another email > address I'm subscribed with but couldn't reply until now. If you also > email the original author, we can communicate faster (for whatever > that is worth) while the list plays catch-up. PS: I absolutely despise it when people use reply-all, and I get two copies of the email in 2 different folders that I have to clean up manually, and if I reply to the wrong one it breaks threading because I'm then replying to a non-list email but sending it to the list. This is the only list I'm on that has always had that problem. If people need to communicate faster than email speeds, that's what the dozen available chat media are for. --Larry Garfield