Re: [RFC] Bare Name Array
| From: | Andrea Faulds | Date: | Tue, 03 Jun 2014 21:10:56 +0000 |
| Subject: | Re: [RFC] Bare Name Array | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74733@lists.php.net to get a copy of this message | ||
On 3 Jun 2014, at 22:06, Rowan Collins <rowan.collins@gmail.com> wrote:
> Yeah, I was reading the Swift intro too. :) It hadn't occurred to me that they'd be
> similar to PHP4, though; I can imagine that causing a bit of resistance…
Well, the problem with PHP4 was that its behaviour was not what you wanted most of the time.
However, passing by value is very useful in some situations, so having it on an optional and
per-class basis would be fine, I’m sure.
For example, it makes very little sense to pass around numbers by-reference. Since PHP lacks
by-value semantics, custom user land numerical types have to be immutable, unless you want to do
endless copying. With by-value semantics, PHP would do what you actually want here automatically.
--
Andrea Faulds
http://ajf.me/