Re: Pseudo-objects (methods on arrays, strings, etc.)

From: Date: Thu, 19 Jul 2012 23:38:16 +0000
Subject: Re: Pseudo-objects (methods on arrays, strings, etc.)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-61529@lists.php.net to get a copy of this message
I'm curious, how do I make my objects have scalar passing semantics, then? On Jul 20, 2012 12:35 AM, "Sara Golemon" <pollita@php.net> wrote: > > > On Thu, Jul 19, 2012 at 2:42 PM, Andrew Faulds <ajfweb@googlemail.com>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 >

« previous php.internals (#61529) next »