On Mon, 2 Feb 2004, 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?
> What is important is that the problems with clone are fixed (almost). And
> you now have a consistent way of calling the parent clone method if you
> choose to.

I don't think George really objects to the name itself as much as he's
wondering why it has to have a fixed name at all.

Forcing an argument to have a specific name really seems inconsistent
with everything else in the language. Following the same logic, we
also should make __get() and __set() have fixed parameter names, but I
don't see anyone arguing for that.

-adam

-- 
[EMAIL PROTECTED]
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!

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

Reply via email to