Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98906 invoked from network); 8 Sep 2008 23:40:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2008 23:40:14 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:32833] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/20-32333-DD7B5C84 for ; Mon, 08 Sep 2008 19:40:14 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 9 Sep 2008 02:41:22 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Sep 2008 16:41:19 -0700 Message-ID: <48C5B81F.4000504@zend.com> Date: Mon, 08 Sep 2008 16:41:19 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Elizabeth M Smith , 'PHP Internals' References: <486FA5FB.1000300@php.net> <48C55855.4080602@zend.com> <48C5624A.1040901@zend.com> <48C56743.2060706@zend.com> <48C56821.2040805@shitennou.com> <48C5695E.1010404@zend.com> <48C56A51.1000307@shitennou.com> <48C56CEE.6050807@zend.com> <48C56DED.4010407@shitennou.com> <48C57045.6020003@zend.com> <48C5715C.2070102@shitennou.com> <48C574E8.1030504@zend.com> <48C57761.5030708@shitennou.com> <48C57F58.3060703@zend.com> <48C59A7D.50201@shitennou.com> <48C5A0B9.2040300@zend.com> <48C5A90E.6060902@shitennou.com> <48C5ABC4.1010008@zend.com> <48C5B010.8040301@shitennou.com> In-Reply-To: <48C5B010.8040301@shitennou.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Sep 2008 23:41:19.0227 (UTC) FILETIME=[64875CB0:01C9120C] Subject: Re: [PHP-DEV] Re: towards a 5.3 release From: stas@zend.com (Stanislav Malyshev) Hi! > And I'd ask - who wants to do new DB::mysql when they can just do mysql? I do. Because this way I don't have to worry my mysql would clash with someone other's mysql, and I can have all DB related stuff under one roof. > The common usage of use is going to be to get the name as short as > possible, and NOT have to type out db:: everywhere. Do you have code There never was a task to make use of as little characters as possible. If you think that was the point, you are mistaken. There were a task to make it manageable, but not at the cost of clarity and robustness and performance. > using namespaces? I have some I can point you to of mine. OK, if you send me the code, I maybe could help you with how to use namespaces the best way there, if you want the help. > Then let me rephrase "Useless to me" - as they are functions in OK, I am sorry that they are useless to you. I hope you have better luck with next feature. However, you can not realistically expect features in PHP be based on your personal taste only, can you? > namespaces are useless to me - they do not do what I think they should > and do not solve a problem any better than a class with static methods. Apparently for people that asked for namespaced functions to be added after classes already were in, they do. You disagree with these people - fine. > You seem to be under the impression that the people writing templates > are as skilled in PHP as the people writing the code using the templates > (or are the same people) - sadly that's very often not the case. OK, suppose it is not. How not knowing what strlen actually does helps you in this case? I'd say more clear the function is - both name and what it is intended to do - less chance someone would screw up. If you have unicode::strlen and just strlen, chances that somebody would do unicode::strlen($binary_data) or strlen($unicode_name) drop significantly. > The bottom line is ... I've given you reasons that I would want to alias > functions...and you seem to be doing nothing more than saying "don't > design it that way" - which quite frankly seems silly. If there's a Well, it doesn't seem silly to me. There are right ways to use namespaces and wrong ways. You insist on using them wrong way and want to make it easier to use them wrong way. I think it is a bad thing to make it easier to use things in wrong way. > good technical reason why you think function_alias wouldn't work other I could live with having function function_alias() - though I think you are dangerously close to runkit() territory. But having function is one, having it in language syntax is another - that is practically endorsement. And I don't want to endorse aliasing functions, especially when primary reason seems to be not having : character in names and saving a couple of keystrokes. It is fine to have tastes, it's just IMHO not enough for putting it into the language syntax. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com