> The cache is needed for keeping indices() and values() stable.
I figured indices(a | b) and values(a | b) would be stable too
providing neither a nor b are otherwise accessed in between.
>Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
>>Otoh, the generation counter is only necessary for a cache inside
>>ShadowedMapping. I think it'd work pretty well without that cache too,
>>so imo it's not worth the overhead in all mappings. Is there something
>>else to motivate havi
Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
>Otoh, the generation counter is only necessary for a cache inside
>ShadowedMapping. I think it'd work pretty well without that cache too,
>so imo it's not worth the overhead in all mappings. Is there something
>else to motivate having bu
The generation counter wrapper would have to be around the mapping
being shadowed. So ShadowedMapping wouldn't be able to take an
ordinary mapping for shadowing if the generation stuff isn't built
into it.
Otoh, the generation counter is only necessary for a cache inside
ShadowedMapping. I think i
Is the problem we are solving a faster overloading than if this
generation stuff was handled internally in the object?
Take a look at Mapping.ShadowedMapping in Pike 7.7.
Any example where this is used/useful?
(I'm not doubting it's usefulness, I'm just curious.)
>On Wed, 25 Jun 2008 13:05:02 -, Martin Stjernholm, Roxen IS @ Pike
>developers forum <[EMAIL PROTECTED]> wrote:
>
>> This is in most cases possible to implement with a wrapper object
>> instead.
>
>Is there a concrete reason (problem case) to have it in the language? You
>are saying "mos
I think grubba have talked about it before, but I didn't expect it to
show up at this point. Is there something we need this for grubba, or
can we postpone it until after the release?
On Wed, Jun 25, 2008 at 12:55:02PM +, Martin Stjernholm, Roxen IS @ Pike
developers forum wrote:
> o The new builtin function m_generation isn't critical enough to
>deserve a place on the global level imho.
i think we should reduce the global level as much as possible, people
get confu
I agree that it was a surprising addition at this time.
On Wed, 25 Jun 2008 13:05:02 -, Martin Stjernholm, Roxen IS @ Pike
developers forum <[EMAIL PROTECTED]> wrote:
This is in most cases possible to implement with a wrapper object
instead.
Is there a concrete reason (problem case) to have it in the language? You
are saying "most" - what
To detect whether a mapping has changed:
int n = m_generation (the_mapping);
...
if (m_generation (the_mapping) != n) {
n = m_generation (the_mapping);
do_stuff (the_mapping);
}
else
werror ("we're still fine\n");
This is in most cases possible to implement with a wrapper
What is the purpose?
Mappings got generation counters yesterday. Although the overhead is
fairly small (poking a flag on every change, and added storage in each
mapping_data for a 32 bit counter), so is the utility; it at least
deserves some discussion whether it should be there or not.
Aside from that, I got a couple
15 matches
Mail list logo