Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34826 invoked from network); 19 Jul 2012 23:38:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2012 23:38:20 -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 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:36357] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/CF-18983-B6A98005 for ; Thu, 19 Jul 2012 19:38:20 -0400 Received: by weyr1 with SMTP id r1so2507293wey.29 for ; Thu, 19 Jul 2012 16:38:17 -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=EqK+P7tsgsTKJbcScSp9XK1SvvHNXIbuMuxNxbvV00U=; b=b/UFLiGILQiEAMQb9FXZVvWzCwmknmr9cM5SRNYYTkp6nIE3hWHCLnvBPXyDBkkeHq tgArvGNEyF4Dp6xDCT+6PQKW8XxmHV9zlfwVStKrAbzRqZkXb7tODAWqwLanzCXb9jN9 6Kxc4pzzPBSdiLSR9Mu6DDQ7rKnLVVCdGgUXkwMhFi3lNSR1vTxHnRbEyiB+ZgOJnuiI j95/JRFlNBxgbdnN8NtWaOvWv9jr9YYYoE/z/tcTjcWVsc4GKrqE30kSIY2y7xfszqg2 /465mHoJ5T0LFUFNafjtMNKTPePt1VzYjSDqBb63Mcdqzn/judfK6GzOkVxQ6lAHjS3V VbcQ== MIME-Version: 1.0 Received: by 10.180.81.138 with SMTP id a10mr8657394wiy.7.1342741096896; Thu, 19 Jul 2012 16:38:16 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Thu, 19 Jul 2012 16:38:16 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Thu, 19 Jul 2012 16:38:16 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Jul 2012 00:38:16 +0100 Message-ID: To: Sara Golemon Cc: internals Content-Type: multipart/alternative; boundary=f46d044401ba1b171704c537464f Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: ajfweb@googlemail.com (Andrew Faulds) --f46d044401ba1b171704c537464f Content-Type: text/plain; charset=UTF-8 I'm curious, how do I make my objects have scalar passing semantics, then? On Jul 20, 2012 12:35 AM, "Sara Golemon" wrote: > > > On Thu, Jul 19, 2012 at 2:42 PM, Andrew Faulds wrote: > >> I never said treat them as objects. I said give them methods. Not the >> same thing. >> > Fair enough, noone is talking about giving them properties or formal class > definitions. > >> And what do you mean by "technical debt"? >> > I mean that we'll never escape the functional side of PHP, nor should we > try to. So we're not talking about replacing a set of APIs, we're talking > about duplicating APIs which already exist. More than that, we're talking > about creating a whole new branch of primitive handling in order to give > them methods without actually giving them class methods. I'm not saying > that any of this is difficult to do, I'm asking if it actually gains us > anything which justifies doubling the number of implementations which deal > with string, array, and scalar operation. > > Given that you can accomplish this with a PECL extension, my answer is > "No, it doesn't." > > -Sara > --f46d044401ba1b171704c537464f--