Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20428 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51915 invoked by uid 1010); 25 Nov 2005 19:30:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51900 invoked from network); 25 Nov 2005 19:30:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2005 19:30:18 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:49247] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 8C/13-56276-A4667834 for ; Fri, 25 Nov 2005 14:30:18 -0500 Received: from [192.168.1.3] (dslb-084-063-047-015.pools.arcor-ip.net [84.63.47.15]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id C00E8610282; Fri, 25 Nov 2005 20:36:27 +0100 (CET) Date: Fri, 25 Nov 2005 20:28:18 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <955021720.20051125202818@marcus-boerger.de> To: Christian Schneider Cc: Ilia Alshanetsky , PHP Developers Mailing List In-Reply-To: <43870E22.8000309@cschneid.com> References: <7.0.0.16.2.20051124161240.0573e640@zend.com> <20051125034515.6fefa4e2@localhost.localdomain> <43867C6C.2010209@prohost.org> <20051125040950.26305e08@localhost.localdomain> <43869FC5.4060708@lerdorf.com> <20051125075501.79718ee6@localhost.localdomain> <1132903004.9936.25.camel@localhost.localdomain> <1086017308.20051125091648@marcus-boerger.de> <01.D8.11378.05EC6834@pb1.pair.com> <1946534082.20051125100920@marcus-boerger.de> <4386D5C6.8040802@php.net> <4386E355.7020901@cschneid.com> <43870917.5070409@prohost.org> <43870E22.8000309@cschneid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out there) From: helly@php.net (Marcus Boerger) Hello Christian, here again namespaces would be perfect. Given a lib that doesn't prefic you'd simply d: namespace LibNameHere { reqire "some_lib_include"; } and be done...wohooo :-) regards marcus Friday, November 25, 2005, 2:14:10 PM, you wrote: > Ilia Alshanetsky wrote: >> Defining classes/function with generic names will always be a problem as >> they may end up conflicting with same constructs from other libraries or >> PHP itself. > Sure. But that doesn't change the fact that a class named date is > *known* to cause conflicts. And that the core has a higher > responsibility than any extension/library/package IMHO. >> To design future proof code projects for the most part prefix all their >> functions/classes to prevent naming conflicts. > Had a quick glance at Gallery2 because it was lying around and they > don't consistently prefix things. Most classes are prefixed but not all > of them. I'm inclined to believe that's the case for most popular > packages, let alone everything else. >> It makes little sense to have a class called curl_curl, when it comes to >> functions the coding standard applied and all functions have a prefix. > That's why I wrote "... (at least when a common name like date is > used)". While Curl is unique enough (although I'd rather have a longer > name for the sake of a uniform naming scheme) the name date will > *definitely* be causing problems. We all agree on that I think. > The question is only if you shift the responsibility to PHP developers > (a mere dozen people could decide to change it) or to PHP users > (thousands, not even aware of the issue). > Signing out of this thread with a plea for pragmatism, > - Chris Best regards, Marcus