Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41644 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45463 invoked from network); 4 Nov 2008 16:28:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2008 16:28:25 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:41909] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/86-15458-82870194 for ; Tue, 04 Nov 2008 11:28:25 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id A81064144058; Tue, 4 Nov 2008 16:29:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PIsA6f0a3Z9D; Tue, 4 Nov 2008 17:29:07 +0100 (CET) Received: from [192.168.4.130] (cust.static.84-253-51-151.cybernet.ch [84.253.51.151]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id C67CB4144009; Tue, 4 Nov 2008 17:29:06 +0100 (CET) Cc: Christian Schneider , PHP Development Message-ID: To: Gregory Beaver In-Reply-To: <49107527.7060604@chiaraquartet.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 4 Nov 2008 17:27:17 +0100 References: <49048EC1.9060908@chiaraquartet.net> <49061E01.8060503@zend.com> <11c607a60810271344i1a8cf53fl149447ad2f687f99@mail.gmail.com> <490628DB.9060209@zend.com> <11c607a60810271422l68949427pe31786275b0b152c@mail.gmail.com> <08747094-6B50-4A0D-9057-DFD12108B6C6@caedmon.net> <94CCB864-179A-48DA-A89A-3859796A9257@pooteeweet.org> <49063A1D.7070804@zend.com> <4906405F.7090205@zend.com> <490747B2.2010201@zend.com> <4D9A8597-EFE6-418A-B7F6-EAD9ED2361A5@pooteeweet.org> <7FA6946B-57B9-4BC0-B2F1-AFD47572F363@pooteeweet.org> <491071EC.7020501@cschneid.com> <49107527.7060604@chiaraquartet.net> X-Mailer: Apple Mail (2.929.2) Subject: Re: [PHP-DEV] namespace separator and whining From: mls@pooteeweet.org (Lukas Kahwe Smith) On 04.11.2008, at 17:15, Gregory Beaver wrote: > In other words, it is perfectly all right to have a different name > resolution for classes than we have for functions and constants > because > of this different expectation. It is dangerous to fallback for > classes > prior to autoload, but it is not at all dangerous for > functions/constants because the expectation is different. To me the key question is do we want to let people overload global classes easily or are we mostly talking about convinience? Class names are typed quite seldom (and even in a few years down the road the bulk of PHP's features will be provided via functions), so I would not think that we really need to focus on convenience here. > For this reason, the only resolution that we should be considering is: > > classes: > 1) try ns::class > 2) autoload ns::class > 3) fail > > functions/constants: > 1) try ns::function/ns::const > 2) try internal function/const > 3) fail. > > Note that I say "try internal" because the only purpose behind > allowing > this is to make it easier to use PHP's built-in functionality. Any > userspace stuff should be specifically \prefixed or imported via use. I dont think it makes sense to differentiate between internal and non internal functions. I think this is quite hard to grasp, I also do not see the real benefit. > And (yes) we need import for functions. Would be nice to have .. for me the pains for functions/constants have reached the threshold now that I am reviewing the question of resolution. regards, Lukas Kahwe Smith mls@pooteeweet.org