Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99505 invoked from network); 17 Jul 2012 20:30:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 20:30:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.203 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.203 smtp203.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.203] ([67.192.241.203:53442] helo=smtp203.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/10-33055-B5BC5005 for ; Tue, 17 Jul 2012 16:30:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp10.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 6B02C1B81BF; Tue, 17 Jul 2012 16:30:17 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp10.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id E4C221B814C; Tue, 17 Jul 2012 16:30:16 -0400 (EDT) Message-ID: <5005CB58.2020601@sugarcrm.com> Date: Tue, 17 Jul 2012 13:30:16 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Pierre Joye CC: Gustavo Lopes , internals , Andrew Faulds References: <50059AF8.5050805@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Having pure object would be not efficient enough and brings its lot of > caveats. Also it is important to keep in mind that this idea does not > apply only to array but to other types as well. Same for other types. Just adding -> doesn't make the code object-oriented. And just bolting -> on top of regular function calls because it looks prettier seems meaningless to me. OK, we could make $foo->bar() mean bar($foo) - python already has pretty much the same idea, after all - but what's the point in it? I don't see any that would be worth the effort. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227