Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53954 invoked from network); 18 Jul 2012 07:31:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2012 07:31:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:57801] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/52-39169-54666005 for ; Wed, 18 Jul 2012 03:31:17 -0400 Received: by yenl12 with SMTP id l12so1452786yen.29 for ; Wed, 18 Jul 2012 00:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QzKpd7oFqzm+ncqL1mPNPPvsBhJCaq8XSZYYqql3u/o=; b=ynPdm5y45EK+P3aLvZd8cVh/lC8kII/RtMSoPWltpWMuPGrkwQHcWccutHw5kO35SE KfDgl1TTHgIIRwqVF8sssEXqUu+8fx0fVZ8KpRYW+BmpE4AXQzPL47rJycYwxIfbNxww z0ETx60mbiSrppyYyQe8jgkOsVeYJ27uejgvy7EzV0x6v6cyBAzi0fredPP/9bCicKD4 u7YJvAWlKKudyBBG/6wt3uXDzPfDw2moqA23vFrG3e92aYe1oKc/GF08T2xRLUjKbfZt TOhth+0rOdNWsomerHmxNrj1wHHxxv/E7vIBt37BjseogDuDlJdBCXEeVYz0S722APNW en1A== MIME-Version: 1.0 Received: by 10.50.77.200 with SMTP id u8mr1112318igw.6.1342596674477; Wed, 18 Jul 2012 00:31:14 -0700 (PDT) Received: by 10.231.134.9 with HTTP; Wed, 18 Jul 2012 00:31:14 -0700 (PDT) In-Reply-To: <5005CB58.2020601@sugarcrm.com> References: <50059AF8.5050805@sugarcrm.com> <5005CB58.2020601@sugarcrm.com> Date: Wed, 18 Jul 2012 09:31:14 +0200 Message-ID: To: Stas Malyshev Cc: Gustavo Lopes , internals , Andrew Faulds Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: pierre.php@gmail.com (Pierre Joye) hi! On Tue, Jul 17, 2012 at 10:30 PM, Stas Malyshev wrote: > 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. Not the point. > 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. See the other answers, clear APIs, no more argument mess, cleanness. Those are pretty good selling points and without any kind of BC. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org