Re: Bug #14539 Updated: Assigning null to reference has unexpected results.
| From: | Markus Fischer | Date: | Thu, 27 Dec 2001 21:43:22 +0000 |
| Subject: | Re: Bug #14539 Updated: Assigning null to reference has unexpected results. | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3715@lists.php.net to get a copy of this message | ||
On Thu, Dec 27, 2001 at 09:21:11PM -0000, jfrisby@mrjoy.com wrote :
> Frankly this behavior is quite unintuitive and crude. I didn't
> expect PHP references to behave like C pointers, but it would
> be nice if they behaved similarly to references in other major
> languages such as Java, and Perl.
>
> While the Unix filesystem analogy does clarify things, I think
> it's a poor model that makes objects and references clumsy to
> work with. If you have to explain "X will not do what you
> expect", you should reconsider whether or not you've chosen the
> optimal semantics.
>
> And another note: I would tend to think that objects (and
> possibly arrays) would best be assigned by reference *by
> default*, for both reasons of efficiency and expected
> semantics.
Thats the way ZE works and thats it.
ZE2 changes most things you complain about.
--
Please always Cc to me when replying to me on the lists.