Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94686 invoked from network); 8 Sep 2008 18:24:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2008 18:24:19 -0000 Authentication-Results: pb1.pair.com header.from=auroraeosrose@shitennou.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=auroraeosrose@shitennou.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain shitennou.com from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: auroraeosrose@shitennou.com X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:36476] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/73-13670-2DD65C84 for ; Mon, 08 Sep 2008 14:24:19 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id B899E91E12A; Mon, 8 Sep 2008 11:23:33 -0700 (MST) Received: from [192.168.1.101] (24-247-219-180.dhcp.cdwr.mi.charter.com [24.247.219.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 1A6C891E129; Mon, 8 Sep 2008 11:23:32 -0700 (MST) Message-ID: <48C56DED.4010407@shitennou.com> Date: Mon, 08 Sep 2008 14:24:45 -0400 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stanislav Malyshev CC: internals@lists.php.net 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> In-Reply-To: <48C56CEE.6050807@zend.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Re: towards a 5.3 release From: auroraeosrose@shitennou.com (Elizabeth M Smith) Stanislav Malyshev wrote: > Hi! > >> For me they are ways to "package up" code without interfering with built >> in PHP functions or other libraries I wish to use. > > Right, I agree. > >> I don't want to retrain myself or others to call all functions in my >> code as though they were static methods. I want to be able to have > > Here I disagree. I don't think you can both work in terms of multi-space > and not expect to have at least a slight change of mindset when using > multi-space. I think this would only lead you into trouble - suppose one > day you'd want to use two libraries and each of them has its own > definition of _()? You'd get there eventually - so maybe we better start > thinking right from the start. And what happens when you have two libraries and each has their own Date implementation? How is that any different? If you could alias in functions, you'd simply alias them in differently - call one _() and one new_gettext - that's the point of aliasing, to avoid collisions > >> functions with the same names as php functions without prefixing or >> other extra typing - not because it saves keystrokes, but because it's >> confusing - is that a function call or a method call? > > For me, I think it's much more confusing to have strlen() mean 10 > different things than have Foo::strlen() and Bar::strlen(). And I do not > see any substantial difference between "function call" and "static > method call" - for me, it's just as similar as "one-argument function > call" and "two-argument function call". > I guess it is also a matter of personal coding style... Actually I don't do a lot of coding with functions at all, but I have been soliciting other's opinions on the subject of namespace use, and was challenged to create an application using two namespaced functional libraries. Let's just say it was an eye opening experience, and where my opinion that functions in namespace are essentially useless came from , since it forces procedural coders to totally alter the way they're accustomed to writing code. Thanks Elizabeth