Re: Flamewar Summary
| From: | Richard Lynch | Date: | Thu, 18 May 2006 22:22:36 +0000 |
| Subject: | Re: Flamewar Summary | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23570@lists.php.net to get a copy of this message | ||
>> Sebastian Bergmann wrote:
>>>> Addition of support for dynamic statics ala: class foo {}
>>>> foo::$bar = 1;
On Wed, May 17, 2006 2:03 pm, Marcus Boerger wrote:
> there is a technical issue besides slowdown. We have to work around
> the
> fact that suddenly a function might get $this as a normal variable
> (remember
> the examples give on this list included that). Right now $this is
> handled by
> a special zval not stored in the local or global symol table bit
> EG(this).
> This will become a major maintanance hell. Also allowing $this as
> normal
> variable again will confuse people because suddenly after 5.1 they are
> under some circumstances suddenly able to change $this. That said, we
> will
> also get a bunch of new bug reports, but who cares, it's the others
> dealing
> with them. And all for what? to refuse using globals as they are to
> php'isch? or to use an array in a declared sttaic variable as that can
> already be done and is also far to php'ish?
I'm not sure it helps, or even if I understand the problem, but
perhaps...
A reasonable compromise might be that only scalars could be used for a
late-binding static foo::$bar = VALUE;
Similar to what is (used to be?) allow for variable initialization
within a class definition.
Or, perhaps, scalars and arrays of scalars allowed, but NO OBJECTS.
It seems like the majority of people who find this late-binding static
stuff useful are not really wanting to cram instance references, much
less $this into there...
This presumes that whatever was done for class property initialization
could be readily repeated at the junction of an assignment to a static
property, which might be a completely incorrect assumption.
This is also post-vote, which might render it meaningless, which is
fine -- just an idea if the vote is inconclusive or turns out to be
void.
--
Like Music?
http://l-i-e.com/artists.htm