Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20585 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27624 invoked by uid 1010); 26 Nov 2005 20:37:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27609 invoked from network); 26 Nov 2005 20:37:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2005 20:37:45 -0000 X-Host-Fingerprint: 69.64.38.41 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from ([69.64.38.41:38664] helo=bluga.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 86/C9-56276-997C8834 for ; Sat, 26 Nov 2005 15:37:45 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by bluga.net (Postfix) with ESMTP id 8E65A21CA0B; Sat, 26 Nov 2005 14:39:18 -0600 (CST) Received: from bluga.net ([127.0.0.1]) by localhost (bluga.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31971-19; Sat, 26 Nov 2005 14:39:18 -0600 (CST) Received: from [192.168.1.101] (ftcl002.digis.net [66.17.140.42]) by bluga.net (Postfix) with ESMTP id 34E4021CA08; Sat, 26 Nov 2005 14:39:18 -0600 (CST) Message-ID: <4388C793.2010201@php.net> Date: Sat, 26 Nov 2005 14:37:39 -0600 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pierre CC: internals@lists.php.net References: <20051126024119.00105e42@localhost.localdomain> <4388059C.8060106@php.net> <20051126133157.122359e1@localhost.localdomain> In-Reply-To: <20051126133157.122359e1@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new using ClamAV at bluga.net Subject: Re: solution to the "Date" issue From: cellog@php.net (Greg Beaver) Pierre wrote: > On Sat, 26 Nov 2005 00:50:04 -0600 > cellog@php.net (Greg Beaver) wrote: > > > >>Pierre, you can do all the #ifdefs you want, this idea does not >>prevent this :). In addition, the #ifdef has no effect on this idea. > > > > You do not get the main problem. > > - The ifdef makes it disappear from a user point of view > > - The class should not even exist in the source > > - Nobody tested, agreed on it > > - 5.1 is frozen since july Pierre, I get the main problem, but I'm not sure that you do. I mean, think for one second about what you're saying: Taking the class out of PHP 5 will solve the problem for now (and I absolutely agree that this is necessary - so does *everyone* else save Derick, who is now on vacation and can't defend himself), but any time in the future it is introduced as "Date" will conflict with all existing code that has a class named "Date". #ifdef will never solve this issue. PHP code *needs* to reserve a naming area, I proposed PHP_ as a prefix for *all* new internal classes. This means that if someone comes up with a class to implement the Yertl standard as an internal class, it would be named PHP_Yertl. When namespaces come out, this will not be necessary, as we can do the same thing with the "PHP" namespace. This to me is an incontrovertible argument for namespaces: we need these to avoid PEAR's_Ridiculously_Long_Classnames. Incidentally, this is not a new concept, all constants with two underscores are explicitly reserved for internal use in the manual. Surely the fact that the class exists is a problem, but it is easily solved with #ifdef, as you said. The MAIN problem is that it is named Date, and #ifdef will never solve this problem. Greg