Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37940 invoked from network); 3 Apr 2008 06:31:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2008 06:31:01 -0000 Authentication-Results: pb1.pair.com header.from=markus@fischer.name; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=markus@fischer.name; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fischer.name from 62.179.121.50 cause and error) X-PHP-List-Original-Sender: markus@fischer.name X-Host-Fingerprint: 62.179.121.50 viefep32-int.chello.at Solaris 10 (beta) Received: from [62.179.121.50] ([62.179.121.50:37346] helo=viefep32-int.chello.at) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/2E-17876-1A974F74 for ; Thu, 03 Apr 2008 01:30:59 -0500 Received: from genuine.home ([84.112.136.139]) by viefep32-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20080403063049.EDQB12501.viefep32-int.chello.at@genuine.home>; Thu, 3 Apr 2008 08:30:49 +0200 Received: from ncvielp07.home ([192.168.1.51]) by genuine.home with esmtpa (Exim 4.50) id 1JhIwA-0003Iq-UW; Thu, 03 Apr 2008 08:28:40 +0200 Message-ID: <47F47999.8040200@fischer.name> Date: Thu, 03 Apr 2008 08:30:49 +0200 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Stanislav Malyshev CC: 'PHP Internals' References: <47F463F0.4030407@zend.com> In-Reply-To: <47F463F0.4030407@zend.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=C2272BD0; url=http://markus.fischer.name/my_public_key.txt Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -37 X-Spam-Level: --- X-Spam-Report: Spam detection software, running on the system "genuine.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, naming classes/function is really an important concern and I'm happy that such a thing gets a dedicated thread finally. Stanislav Malyshev wrote: > internationalization capabilities of the ICU library to PHP 5, > specifically 5.2.x and 5.3.x branches. We felt that as PHP gets more and [...] Content analysis details: (-3.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -3.3 ALL_TRUSTED Did not pass through any untrusted hosts -1.1 BAYES_40 BODY: Bayesian spam probability is 20 to 40% [score: 0.3900] 0.5 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] intl naming From: markus@fischer.name (Markus Fischer) Hi, naming classes/function is really an important concern and I'm happy that such a thing gets a dedicated thread finally. Stanislav Malyshev wrote: > internationalization capabilities of the ICU library to PHP 5, > specifically 5.2.x and 5.3.x branches. We felt that as PHP gets more and Is there any chance this is not going to be available for 5.2? Because if so, I would add another option to the naming suggestions below: * finally *use* namespaces Although I'm next to not at all involved in the current development, this was actually on my mind for a view days and I was thinking about writing to the list. Especially with so many classes at once introduced I think it would be a good idea to finally think about this too. Personally, globbering the global namespace with such common names is irresponsible (but this has been discovered already). Actually there are existing classes being named Locale, I fired a quick google code search: http://www.google.com/codesearch?q=lang%3Aphp+class.*Locale&hl=en&btnG=Search+Code Of course I've never heard of them myself, but it's really not hard to assume that such a class likely exists. The same applies to the "Collator" class, see http://www.google.com/codesearch?hl=en&lr=&q=lang%3Aphp+class.*Collator&btnG=Search More example could probably be found but I think the two examples makes it clear that we need to namespace or prefix them. Of course I've never heard of and used any of those classes and I guess most internal developers here probably have neither, but that doesn't mean they aren't in use somewhere. I understand that, as long as this has to be available for 5.2, namespaces are forever out because of BC. But if this could be pushed, I would really be happy. Just to be clear, this is not some kind of bickering and especially not about ext/intl, but I'm trying to create a general awareness of problems we would run here in the future. If namespaces aren't and option because waiting for 5.3 only is not viable, I'm for number four. Stop creating headaches with namespace/prefix-less introduction of new things. > 4. Rename both classes and functions. > Pro: All API looks the same, purists are happy > Contra: API looks ugly, too many prefixes for functions. thanks, - Markus