On Feb 2, 2004, at 2:57 PM, Andi Gutmans wrote:


At 02:42 PM 2/2/2004 -0500, George Schlossnagle wrote:

If you force the parameter to be name $that, what's the point of requiring it to be passed at all? Seems analogous to having all methods be required to pass $this as their first parameter.

Because it's a good way of retrieving the to-be-cloned object (no behind the scenes magic), and in my opinion, it's cleaner because everyone's clone functions will look the same and it'll make it easier to understand them.
Why do you care so much if it's called $that or $foobar?

I wouldn't say that I care 'so much', but since it's on the cusp of change I thought I would throw in my two cents. When you have a variable with a fixed position and a fixed name, I don't really see the point in specifying it at all on the command line (i.e. it's like having to pass 'self' into all your python methods, which seems annoying).


And if you do have to pass it, I don't see the value in standardizing the name - you aren't forced to use $key and $value in __get/__set, so why here?

Like I said, I don't really care, it just smacks of inconsistency enough to make me send one (or two now, I guess) mails.

George

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to