Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67114 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90938 invoked from network); 23 Apr 2013 19:29:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Apr 2013 19:29:41 -0000 Authentication-Results: pb1.pair.com header.from=dnl.rlnd@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dnl.rlnd@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.45 as permitted sender) X-PHP-List-Original-Sender: dnl.rlnd@gmail.com X-Host-Fingerprint: 209.85.214.45 mail-bk0-f45.google.com Received: from [209.85.214.45] ([209.85.214.45:40820] helo=mail-bk0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/01-17855-121E6715 for ; Tue, 23 Apr 2013 15:29:38 -0400 Received: by mail-bk0-f45.google.com with SMTP id j4so427975bkw.32 for ; Tue, 23 Apr 2013 12:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=kXc284l7+2xaFiVkhgHHoWDMECDO6ItqIIW25rtQea8=; b=vZs5Gojx6OcgC4St3NdB7K2HL+PsQavgyf0mD/BRufIFyMIBWtA1QyVVB4xXjIIIn2 eiiTyrPn4vLBKUsoUea4JnePgZFQbV5xjthcRDM19E5vQBvNN5/5wfUdcIIbvA3z3uwO lFQtOmxWxccqmmbiSz0huNZREXkPUsxzOj37X6dGmkI+45EzShCF8fqKiPXsP7FTiBHR U0hkMSDgG+X9Q7M9isZ55236akPhiF//twcM61A+Jp1R+tAprYzR3obUrijKLC8yOMlz 3Wh7e9y9Zbq88Ci4ykfcYEctcaZOFYNif2PpfazYfWsgoURO4Im74Rsdk8NxlpXzOY/V N8tA== X-Received: by 10.205.103.67 with SMTP id dh3mr13784101bkc.19.1366745375085; Tue, 23 Apr 2013 12:29:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.113.132 with HTTP; Tue, 23 Apr 2013 12:28:54 -0700 (PDT) In-Reply-To: <5174EE1C.2030002@anderiasch.de> References: <5170E1F8.9060203@sugarcrm.com> <000e01ce3ee3$597521f0$0c5f65d0$@tutteli.ch> <5174EE1C.2030002@anderiasch.de> Date: Tue, 23 Apr 2013 21:28:54 +0200 Message-ID: To: Florian Anderiasch Cc: Robert Stoll , Igor Wiedler , PHP Development Content-Type: multipart/alternative; boundary=f46d0421869f94cafe04db0c343a Subject: Re: AW: [PHP-DEV] Importing namespaced functions From: dnl.rlnd@gmail.com (Daniele Orlando) --f46d0421869f94cafe04db0c343a Content-Type: text/plain; charset=UTF-8 +1 The current behavior is really annoying. 2013/4/22 Florian Anderiasch > On 04/22/2013 12:55 AM, Robert Stoll wrote: > > I agree with Igor. The readability could be improved and I do not see the > > problem of hiding built-in php functions (however, I would not recommend > > it). > > I would say, if someone hides the normal php built-in function then he or > > she is doing that on purpose and is aware of the consequences. Thus it is > > also fine if the same person imports the function, which hides the normal > > php built-in function, in another namespace. > > Huge +1 from me. > > I know that using only functions instead of OOP in PHP has this > 90s-PHP3-Vibe to it, but as a matter of fact you can write mostly > side-effect free code using only functions in PHP. > > This would make using functions much more flexible and even more > importantly, consistent to everything else. > > The only downside to this proposal, as Stas correctly mentioned is that > it would allow people to shoot themselves in the foot when using weird > import behavior. But as you deliberately have to misuse this I don't see > any real harm. Something like instance variable shadowing in Java is > much, much more error-prone and still hardly anyone complains about this > kind of feature. > > Greetings, > Florian > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --f46d0421869f94cafe04db0c343a--