Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44727 invoked from network); 20 Jan 2017 18:58:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2017 18:58:29 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.173 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.173 mail-yw0-f173.google.com Received: from [209.85.161.173] ([209.85.161.173:33554] helo=mail-yw0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/F6-00729-5DD52885 for ; Fri, 20 Jan 2017 13:58:29 -0500 Received: by mail-yw0-f173.google.com with SMTP id u68so59628151ywg.0 for ; Fri, 20 Jan 2017 10:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T7I0N3vS0ASvjl9MTFwuMBlijZW0AdAkuhj1VeKAYcI=; b=WNhV+MvkZ74wtyXomCoVKkYyThVRQ+jPxRScitbxB03/sgsalkBYs3Srk/6l0hd3Vg FlN+qsvbMkrdmaBmzi0SdKcGTj9H3sH5jymsyQ5o/bqHrnovg6O8zWBp3i7mtR5P1NQt 7AbUzmfZFvOWVeiCqVkAgr0W3VF2oRM8sEINi2vi3bEi8Om3LL5lWnBK/sKFMgE1fLIJ Q4CKcFZdQf+Zfjgg8jBiouhi7nKqB+/IAs29jzuYrLN0MpHSzVc+Y0sRhKbePKxTw0si vWNd2EaXF+ia4wlapv3UvASTYG9V6sykFpdnBnBRziAo3Vph133qmDB+Y06dkX2z/Txj LAqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T7I0N3vS0ASvjl9MTFwuMBlijZW0AdAkuhj1VeKAYcI=; b=jghFphoM4s/wGu95NGpiW3zcEvGVpSZISyMfbht23u+dSaO2z++LyrX4FNw9fKfS4i Bp9ouz93KVzaauilAkreai273F8K8hONASW4pMIIBoNOsZvcq1tv3Re9E0vAikLgko8N v6W9wFaZT00fuXTcPBF+yaJQlqMTgycVTxsyW1k+M2uNicJKCj8mL1oo4zrskgVKYFD4 M+37DzO/5OeVGX8qH+vhQRoSql3GnPh9mOTxh3uURqRjTX6sTuUUEdy/ieaJZCvBs9nx q5ohH3KaaHHIfQv6ZbasgC2xhxoPKPYAl2r1LLaAl0otXX5S4GBx/GrsDeJtCz0bWLyb pXWQ== X-Gm-Message-State: AIkVDXLfBx5DLSQrxqmuRwox9X54c1hcDJlhIOOGCjITJ1f+ns8LQa55Bk+QHh8ItaCns+gbjxC6Ld2nKuuyXw== X-Received: by 10.13.248.198 with SMTP id i189mr12483646ywf.274.1484938707161; Fri, 20 Jan 2017 10:58:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.80.215 with HTTP; Fri, 20 Jan 2017 10:58:26 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Jan 2017 19:58:26 +0100 Message-ID: To: Stanislav Malyshev Cc: Rasmus Schultz , PHP internals Content-Type: multipart/alternative; boundary=94eb2c0808bc27576505468b3c7f Subject: Re: [PHP-DEV] Not autoloading functions From: nikita.ppv@gmail.com (Nikita Popov) --94eb2c0808bc27576505468b3c7f Content-Type: text/plain; charset=UTF-8 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"? > How hard is it to write Foo::bar? You never have to go more > than one level. I don't see a point in mixing internal function > namespace with class methods for the sake of saving typing couple of > characters. > > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c0808bc27576505468b3c7f--