Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123643 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 62FB41A009C for ; Sun, 16 Jun 2024 18:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718561348; bh=MP/t2biMnN18mxO9aRUSKAFmGyvAd0KRE698Q4BxPFM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=QwLMAkF/WEAtRh6dTmAJnrFZ1BNh2peXS4od/mOG3lvrobtbvet39ynWjMJCGvmL/ odgqItLl9xcSheFE4Zfi4kQUd4B8AH3J+crgJuGrx6HOzRJpy0MTcQzkBYFVhQcDhO UkexA8XXvNObVfzwWjgJIUPxtIWNahG3nlV18m+uO4oitjgAc0f7G6egQE1M3qllfe 3Pj/0H62hHuINWp6uOVSb7jfeFMgkI3X6mKEzJz/S1YA9D2z5pkTAPGFcx4GWQLr8Q GSk5/ElDBSKwthAFeICaYf7GvczvAJvfME4aYTWJ9LxZuTKOojsuW2IwMSADHtro3X kBY+uJNQ19oCQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8489F180C2F for ; Sun, 16 Jun 2024 18:09:07 +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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,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 fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (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 ; Sun, 16 Jun 2024 18:09:06 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 349A211400A6 for ; Sun, 16 Jun 2024 14:07:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 16 Jun 2024 14:07:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=1718561275; x=1718647675; bh=vVhOOwGJK7 C1rUfTzszqzoAlPPLmezfBGV6s9kqiMnE=; b=XRUYPPV3iM1b1VwKRGr/DDTEB9 U75Z4I6n32rD3QbtRxyXQgqE9U2b+Y+xGyUKz50hiDqVqMjBbU3nbJ2ALv3Hg3pm JPbYZm1+ugLJ6rZPUwyh2S9ZtcCkPu6lwa6yoXH6TfzgPqJzAzvbRgydClKL/SjQ 2uLDgBw4iVQnAQ8Eogi179Gw8RPuFx4cLcxXAvnrVRokhwQ3BCooxA8h0ACEOPeC Bhtf8Z/Z3kgJYSemWIgBgGJrQEsOmIQTIqwn39EtaQGQ8JHM75sMvUmWw3sblNJO mCuKplHimKj1UTj/IHOZDaJPQpy3v1fxn4+pLRSPcDAvZe/qCwaZ2KqKiADA== 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=1718561275; x=1718647675; bh=vVhOOwGJK7C1rUfTzszqzoAlPPLm ezfBGV6s9kqiMnE=; b=bZiJ84KcdCUsiyO90wivO6aHHaJkdkF6nqwbRjYVIIKf 2QMtbpq4iwED/M3VcW81hNFYrhmEykbCpBEZ4Rn0xQku+kGcJhJU287cwIeVz+gl 17QZzRR/DIApZ4JnquAPaJpP048mb0jbd92VzYm+e9mM5Nc4QCF4z8yTAut7frgC D3PFso3o6OIw0fMXbd2cRWcJFdboVCvjI90UBg9j6lnvmF0tzn0uKg7whR2QSsQX CfwDxFv6gv1w6OkAam+3cmqs0c0cS8bsu/sF/i382eDYEaUHCJ6Ntna5p4r1X97S seyhonfKvgaMa2MbOPYksun1x6dviOoZ42JnjZwAVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvfedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtd erredtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdf uceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpe ehteelieeigfeuudeiueeiffdvveehudeufeekjeeugffffedtiedtgeettdelteenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehimhhsohhprd hphhhpsehrfigvtgdrtghordhukh X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 16 Jun 2024 14:07:54 -0400 (EDT) Content-Type: multipart/alternative; boundary="------------b3mOlOLD6SS0aBuhj3gAH4GY" Message-ID: Date: Sun, 16 Jun 2024 19:07:53 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Static class To: internals@lists.php.net References: <0cf69a14-f1b5-4077-9d91-d7b579485eec@scriptfusion.com> <936e1aa3-48cc-4552-9f68-676ebcdeb596@rwec.co.uk> <1fc2f2d0-718f-45ec-8968-b66a1bde686e@scriptfusion.com> <4e439377-5c20-40d7-bb99-5d0ac6c348e9@rwec.co.uk> Content-Language: en-GB In-Reply-To: From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") This is a multi-part message in MIME format. --------------b3mOlOLD6SS0aBuhj3gAH4GY Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 16/06/2024 18:54, Andreas Hennings wrote: > Yes, the possibility for namespace part imports exists. > Unfortunately these namespace imports usually need to be set up > manually, whereas the regular class or function import has better > automatic support from the IDE. > Also, namespace fragments are often more generic than function names, > so more likely to need a custom alias. That's why I said it was tricky: the language doesn't prevent IDEs suggesting different imports; nor does it require you to name namespace fragments differently from classes; but that's what happens in practice. So to what extent do we build the language based on how it *can* be used, and to what extent do we build it based on how it *is* used? What if that usage changes over time? What if we add more ways to do it, and those aren't used either? I don't think there's an easy answer. -- Rowan Tommins [IMSoP] --------------b3mOlOLD6SS0aBuhj3gAH4GY Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 16/06/2024 18:54, Andreas Hennings wrote:
Yes, the possibility for namespace part imports exists.
Unfortunately these namespace imports usually need to be set up
manually, whereas the regular class or function import has better
automatic support from the IDE.
Also, namespace fragments are often more generic than function names,
so more likely to need a custom alias.


That's why I said it was tricky: the language doesn't prevent IDEs suggesting different imports; nor does it require you to name namespace fragments differently from classes; but that's what happens in practice. So to what extent do we build the language based on how it *can* be used, and to what extent do we build it based on how it *is* used? What if that usage changes over time? What if we add more ways to do it, and those aren't used either? I don't think there's an easy answer.


-- 
Rowan Tommins
[IMSoP]
--------------b3mOlOLD6SS0aBuhj3gAH4GY--