Date: 12/15/99
- Next message: Jeff_Beard <email protected>: "[PHP-DEV] Site relocated?"
- Previous message: Andrei Zmievski: "Re: [PHP-DEV] Fwd: Re: BYREF_DENY"
- In reply to: Stig Bakken: "Re: [PHP-DEV] Fwd: Re: BYREF_DENY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 15 Dec 1999, Stig Bakken wrote:
> On Tue, 14 Dec 1999, Zeev Suraski wrote:
>
> [Zeev]
> | We're seriously considering stating that this notation will be deprecated
> | in future versions of PHP/Zend. It'll definitely break tons of existing
> | code, which is why we have to be very careful about it, and provide people
> | with automated script checkers and such. What do you think?
>
> [Andrei]
> | I think it's a good idea, even thought it will break existing code. You
> | shouldn't arbitrarily define at the call level whether an argument is
> | passed by reference or by value - that's giving too much power to sloppy
> | programmers.
>
> I disagree. Sometimes the programmer using a function knows better
> whether it makes sense to pass something by reference.
I disagree with that observation. The function caller never knows better
than the function author, whether it makes sense to send arguments by
reference. In fact, we've had some weird messups due to the ability of
users to force pass by reference (if you recall, some users relied on
strlen(&$foo) changing the type of $foo to a string). Allowing that
encourages users to rely on the inner implementation of the function
(whether it's built-in or user-defined), when it's something we really
want to discourage and if possible, block.
Zeev
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff_Beard <email protected>: "[PHP-DEV] Site relocated?"
- Previous message: Andrei Zmievski: "Re: [PHP-DEV] Fwd: Re: BYREF_DENY"
- In reply to: Stig Bakken: "Re: [PHP-DEV] Fwd: Re: BYREF_DENY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

