Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47147 invoked from network); 20 Jan 2017 19:30:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2017 19:30:52 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:35401] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/57-00729-B6562885 for ; Fri, 20 Jan 2017 14:30:51 -0500 Received: from cable-81-173-135-7.netcologne.de ([81.173.135.7] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cUetc-0000Fi-SA; Fri, 20 Jan 2017 19:30:48 +0000 Reply-To: internals@lists.php.net References: To: Nikita Popov , Stanislav Malyshev Cc: Rasmus Schultz , PHP internals Message-ID: Date: Fri, 20 Jan 2017 20:30:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] Not autoloading functions From: php@fleshgrinder.com (Fleshgrinder) On 1/20/2017 7:58 PM, Nikita Popov wrote: > On Fri, Jan 20, 2017 at 7:55 PM, Stanislav Malyshev > wrote: > >> Hi! >> >>> Since the autoloading functions proposal is stalled, how about allowing >> for >>> import of static functions instead? >>> >>> use function Foo::bar; >>> >>> bar(); // calls Foo::bar() >> >> I'm not sure why it is good. This would certainly be confusing, if you >> call strlen and turns out it's completely different function from what >> you thought. One thing when it's the same namespace, at least you can be >> aware what this package does, but if it's just an arbitrary function >> from anywhere, it's really bad for understanding the code. >> > > How is that different from the already existing "use function foo\bar\baz > as strlen"? > Or any other function that has no namespace separator in front. ```