Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76586 invoked by uid 1010); 25 Jul 2005 21:48:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76571 invoked from network); 25 Jul 2005 21:48:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2005 21:48:42 -0000 X-Host-Fingerprint: 82.165.42.187 xhantos.de NetCache 5.3-5.5 Received: from ([82.165.42.187:65502] helo=xhantos.de) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id E8/81-58254-83E55E24 for ; Mon, 25 Jul 2005 17:48:40 -0400 Received: from boost.home.ahk (p54A32DD1.dip0.t-ipconnect.de [84.163.45.209]) by xhantos.de (Postfix) with ESMTP id 3308D9B427; Mon, 25 Jul 2005 23:48:52 +0200 (CEST) To: Jessie Hernandez Cc: internals@lists.php.net In-Reply-To: <52.31.61486.E8DCDD24@pb1.pair.com> References: <52.31.61486.E8DCDD24@pb1.pair.com> Content-Type: text/plain Date: Mon, 25 Jul 2005 23:48:33 +0200 Message-ID: <1122328113.647.16.camel@boost.home.ahk> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3 From: alex@kiesel.name (Alex Kiesel) Hi Jessie, first, while your patch applied cleanly (except zend_vm_opcodes.h, which is generated) the build broke with: bison -y -p zend -v -d /mnt/home/alex/cvs/php-namespaces/Zend/zend_language_parser.y -o Zend/zend_language_parser.c conflicts: 5 shift/reduce /mnt/home/alex/cvs/php-namespaces/Zend/zend_language_parser.y: expected 4 shift/reduce conflicts *** Error code 1 I had to increase the expected shift/reduce conflict count to 5 to continue the build, which then completed successfully. On Wed, 2005-07-20 at 00:05 -0400, Jessie Hernandez wrote: > Also, import statements now include the class files, using a new .ini > variable, "class_path". Files under the directories in the class_path have > the namespace names as directories and the class names named exactly as the > file that declares it (like Java), e.g. my_ns:class1 is declared in > $class_path/my_ns/class1.php. I don't like this idea; it restricts the developer to this Java-like class / directory layout. It also restricts him to name his files after the scheme you defined (which is .php) - many use other schemes. Shouldn't PHP let you be free in this kind of decision? I think yes, especially, as this could also be implemented with the __autoload function in user-space. > Again, the only missing feature I know of is "namespace imports". I've been > thinking about it, and I think the best approach is actually very simple. Here's another one: the script gives me alex@boost:~/cvs/php-namespaces# sapi/cli/php ~/tests/classes/dynamic_import.php Parse error: parse error, unexpected T_VARIABLE, expecting T_NAMESPACE_NAME or T_NAMESPACE in /mnt/home/alex/tests/classes/dynamic_import.php on line 3 (IIRC Stanislav Malyshev already mentioned this in the YANP-thread already.) Regards, -Alex