Concerns about weak refs and weak maps.
erik.corry at gmail.com
Fri Oct 29 03:57:05 PDT 2010
2010/10/29 Brendan Eich <brendan at mozilla.com>:
> On Oct 29, 2010, at 12:08 AM, Erik Corry wrote:
>> One of the hallmarks of a real language implementation vs. a 'toy
>> scripting language' ala PHP is a good GC. I'd really like to see
>> someone do a low-latency GC with weak maps before we hobble the
>> language with something that can't be implemented efficiently.
> Any chance you guys will implement the WeakMap proposal?
I can't see Google's V8 team doing that, but anyone can take V8 and do
experiments on their branch of it.
>> By modern I mean generational and either parallel or concurrent.
> Parallel vs. concurrent GC is a good distinction to bring up. We're interested in parallel GC too, and we have a WeakMap prototype under way, so we'll have to report back in due course.
> Still, it seems premature to rule WeakMaps out right now. Rather than strangle them in the cradle, I hope several browser-based engines can implement and see what we find out. The use-cases in the language remain pretty compelling, without a good fallback strategy (leaky strong maps? No object reference keyed maps at all?).
> Concurrent is a different animal from parallel, and I remain skeptical about JS implementations deviating significantly from shared-nothing concurrency, even as the JS embeddings use threads under the hood to utilize more cores.
More information about the es-discuss