Re: Re: [RFC] Object extension, $this binding of closures, chat results
| From: | Christian Seiler | Date: | Thu, 22 Jan 2009 15:20:25 +0000 |
| Subject: | Re: Re: [RFC] Object extension, $this binding of closures, chat results | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42781@lists.php.net to get a copy of this message | ||
Hi Dmitry,
> The only difference is in binding/creation. You suggest
>
> $obj->method2 = Closure::bind ($obj, function () { ... });
>
> and I would prefer something like
>
> create_prototype_method($obj, "method2", function () { ... });
I prefer a static method of the Closure class because it does not
pollute the global function namespace - and also it is far mor OOP-ish
and we are doing this for closure OOP support.
Regards,
Christian