Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94837 invoked from network); 18 Jul 2012 14:32:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2012 14:32:55 -0000 Authentication-Results: pb1.pair.com header.from=ajfweb@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajfweb@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:58208] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/8A-39169-619C6005 for ; Wed, 18 Jul 2012 10:32:54 -0400 Received: by wibhq12 with SMTP id hq12so1208744wib.11 for ; Wed, 18 Jul 2012 07:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qZSZdljOpeo5u3v6yq+GQfMeo+zL3qKgJ0srJkq6quM=; b=YeEXvMlFbjXT7vvv0rSlakpFAr0urCo9jsk2TNeAzEGhz1MFm6Y1pIl1MOYD4pDztJ 8PMProXep6Nn31Z/qUDpfZ/iPbrQGCZbFrU7FK7MSiv2qqRp+M+7d+fVqzeDMJWqnELv XqE0Jmb0PiebwiqIY3wNvaR8utJq0kW1+iFEFIK/f/wR56TBX2ka+FiNQbIb+myyMeEa rNnR5mLtUkL112mTgCPecgZFs08LgLGfkApgXmE9/A71IbYrKQ0m8BdQmRip1KHGjVvP 0BhScLhSEvVnqpizV8rvB780XqQiIBD16sjk2V/yRNnAM/x82i1hWyWk8aYn4cdJ5nSK 39mA== MIME-Version: 1.0 Received: by 10.216.240.196 with SMTP id e46mr670418wer.224.1342621971262; Wed, 18 Jul 2012 07:32:51 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Wed, 18 Jul 2012 07:32:51 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Wed, 18 Jul 2012 07:32:51 -0700 (PDT) In-Reply-To: References: <50059AF8.5050805@sugarcrm.com> <5005CB58.2020601@sugarcrm.com> <50066724.6050901@sugarcrm.com> <50067040.3090307@sugarcrm.com> Date: Wed, 18 Jul 2012 15:32:51 +0100 Message-ID: To: Pierre Joye Cc: Stas Malyshev , internals Content-Type: multipart/alternative; boundary=e0cb4e43cff1aa2dcb04c51b8938 Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: ajfweb@googlemail.com (Andrew Faulds) --e0cb4e43cff1aa2dcb04c51b8938 Content-Type: text/plain; charset=UTF-8 OK, ok. Let me clear some things up here. We don't want it to make things more object-oriented or whatever. The real motivation is to give us a chance to make a much cleaner, much nicer array API without breaking BC. We can keep the legacy array_* and unprefixed functions, but we can also create "pseudo-object methods" (not objects, but methods and possibly properties hooked into the method call processing, checking for non-object types - it's very easy to check (I've done it) for non-objects, and implementing this seems simple enough but I don't know the Zend engine well enough). This way we can have array->key, array->sort(TYPE), etc. for new code to use, instead of the legacy array and string method mess (the latter needs a cleanup more in particular). OK? On Jul 18, 2012 10:14 AM, "Pierre Joye" wrote: > hi, > > On Wed, Jul 18, 2012 at 10:13 AM, Stas Malyshev > wrote: > > > And no, it does not "allow us to clean our APIs" - I again point out > > using -> has nothing to do with cleaning APIs. Repeating "clean APIs" > > as if it is some magic spell will not make false statement true, and the > > statement that using -> somehow cleans up APIs is false. Cleaning APIs > > and pseudo-objects are two completely different things, and nobody yet > > shown any relationship between the two. > > You do not see it, your call. But it indeed does and anyone I was > talking to about this topic agrees with this view but two persons (you > incl.). > > Anyway, it is somehow pointless to argue to death about that as it is > technically not possible yet. I'm 200% sure it will happen. > > Cheers, > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e0cb4e43cff1aa2dcb04c51b8938--