Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58810 invoked from network); 26 Oct 2008 20:08:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2008 20:08:33 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:59452] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/91-46868-F3EC4094 for ; Sun, 26 Oct 2008 15:08:32 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 1AB70C10875; Sun, 26 Oct 2008 13:08:11 -0700 (MST) Received: from Greg-Beavers-monster.local (c-24-63-32-181.hsd1.ma.comcast.net [24.63.32.181]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 7127CC10861; Sun, 26 Oct 2008 13:08:10 -0700 (MST) Message-ID: <4904CE3B.2000001@chiaraquartet.net> Date: Sun, 26 Oct 2008 15:08:27 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Sebastian Bergmann CC: internals@lists.php.net References: <49048EC1.9060908@chiaraquartet.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] namespace separator and whining From: greg@chiaraquartet.net (Greg Beaver) Sebastian Bergmann wrote: > Greg Beaver wrote: >> The decision is made, now I suggest everyone get busy actually trying >> it out. > > How are we supposed to try it out? There is no updated implementation > yet, and I would rather discuss a specification instead. As Steph pointed out, I toiled for about 18 hours to create a working patch *before* the IRC meeting just to be sure there weren't any hidden gotchas. http://pear.php.net/~greg/backslash.sep.patch.txt This patch is unreviewed by Zend Engine experts, and so should be considered a proof of concept only and not a final implementation. > It was mentioned on IRC that internal functions have to be prefixed with > \ when used in a namespaced file. Without a fallback. This is insane. This is not true, and the unit tests demonstrate that resolution in fact is: 1) check for namespaced\functionname 2) check for internal functionname and the same is true for both constants and classes. In fact, the class resolution is what it has always been 1) check for namespaced\classname 2) check for internal classname 3) try to autoload namespaced\classname which is planned to be changed to 1) check for namespaced\classname 2) try to autoload namespaced\classname 3) check for internal classname or even 1) check for namespaced\classname 2) try to autoload namespaced\classname So not all details are completely nailed down, but these are independent of whether \ or :: or &*@$#% is used as the separator, and would *not* be fixed by removing functions and constants because the two issues have nothing to do with one another. Thanks, Greg