Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20396 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94099 invoked by uid 1010); 25 Nov 2005 13:14:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94084 invoked from network); 25 Nov 2005 13:14:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2005 13:14:18 -0000 X-Host-Fingerprint: 195.226.6.9 darkcity.gna.ch Linux 2.4/2.6 Received: from ([195.226.6.9:47508] helo=darkcity.gna.ch) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F8/F0-56276-92E07834 for ; Fri, 25 Nov 2005 08:14:18 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 3DF4313B89B; Fri, 25 Nov 2005 14:14:14 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXQUYPmf; Fri, 25 Nov 2005 14:14:12 +0100 (CET) Received: by darkcity.gna.ch (Postfix, from userid 65534) id DADB413B89A; Fri, 25 Nov 2005 14:14:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on darkcity.gna.ch X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.0 Received: from [192.168.1.72] (unknown [195.226.9.186]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id 08AFB13B891; Fri, 25 Nov 2005 14:14:11 +0100 (CET) Message-ID: <43870E22.8000309@cschneid.com> Date: Fri, 25 Nov 2005 14:14:10 +0100 User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ilia Alshanetsky Cc: PHP Developers Mailing List 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> In-Reply-To: <43870917.5070409@prohost.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gna.ch Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out there) From: cschneid@cschneid.com (Christian Schneider) 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