I share Rick's worry about weak maps. It's not clear how to make an
efficient GC in the presence of weak maps.
As Brendan rightly points out there is already a lot of complexity in
the GC of a typical JS implementation because it is interacting with
the (typically) reference counted, C++ based
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
What's the use case for weak maps? What would you do with it that currently
impossible and why is the workaround (if any) problematic enough to warrant
a weak map implementation?
There's been quite a bit of discussion because of it. Especially in the area
of covert channels and garbage
2010/10/29 Brendan Eich bren...@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
On 10/29/10 4:50 AM, Peter van der Zee wrote:
What's the use case for weak maps? What would you do with it that
currently impossible and why is the workaround (if any) problematic
enough to warrant a weak map implementation?
One case this came up recently was for Firebug, Firebug wants to
On 2010-10-29, at 04:50, Peter van der Zee wrote:
What's the use case for weak maps? What would you do with it that currently
impossible and why is the workaround (if any) problematic enough to warrant
a weak map implementation?
Another use case was mentioned in the New topic regarding
Rick and Erik,
I share your concerns about the importance of efficient GC for JavaScript.
However, based upon direct experience, I'm not particularly concerned about the
impact of Weak maps. The ES Harmony Weak Maps is derived from the Ephemeron
concept first developed at Digitalk. We first
On 2010-10-28, at 17:10, Hudson, Rick wrote:
GC implementation
Software stacks on multicores will need GCs to become increasingly concurrent
and latency free. Weak maps cause concurrent GCs and additional mutator
synchronizations. While a concurrent GC already has to do some
Weak maps are used to create an association (based upon object identity)
between an object (the key) and some arbitrary information. They are necessary
if you need to maintain such an association and you cannot modify the key
object to directly record the association.
Without some sort of
I have used them in two ways in practical application.
A rather odd but quite interesting use case is short lived caches. Consider
a recursive static function such as the Fibonacci sequence. You could hold a
cache of the previous computations and allow them to be collected at the
GC's leisure.
On Oct 29, 2010, at 3:57 AM, Erik Corry wrote:
2010/10/29 Brendan Eich bren...@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
On Oct 29, 2010, at 12:08 AM, Erik Corry wrote:
Let's be careful not to add things to the language that will limit
implementations from getting the sorts of modern GC implementations
that Java and .NET have.
Yet don't Java and .NET have weak-keyed maps of some sort?
/be
On 10/29/10 10:51, Brendan Eich wrote:
On Oct 29, 2010, at 12:08 AM, Erik Corry wrote:
Let's be careful not to add things to the language that will limit
implementations from getting the sorts of modern GC implementations
that Java and .NET have.
Yet don't Java and .NET have weak-keyed maps
-Original Message-
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-
boun...@mozilla.org] On Behalf Of felix
Sent: Friday, October 29, 2010 12:18 PM
To: Brendan Eich
...
Yet don't Java and .NET have weak-keyed maps of some sort?
Java has WeakHashMap, which is a map of
Oops, typo fixed below
-Original Message-
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-
boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock
Sent: Friday, October 29, 2010 12:24 PM
To: felix; Brendan Eich
Cc: Andreas Gal; es-discuss
Subject: RE: Concerns about weak refs
C# 4.0 has WeakMap's too, and one of the goals was to work around the cyclical
reference issue:
http://blogs.msdn.com/b/clrteam/archive/2009/05/18/the-conditional-weak-table-enabling-dynamic-object-properties.aspx
-Original Message-
From: es-discuss-boun...@mozilla.org
On 10/29/10 15:18, Jim Deville wrote:
C# 4.0 has WeakMap's too, and one of the goals was to work around the cyclical
reference issue:
http://blogs.msdn.com/b/clrteam/archive/2009/05/18/the-conditional-weak-table-enabling-dynamic-object-properties.aspx
mono implements ConditionalWeakTable
On Oct 29, 2010, at 4:01 PM, felix wrote:
On 10/29/10 15:18, Jim Deville wrote:
C# 4.0 has WeakMap's too, and one of the goals was to work around the
cyclical reference issue:
How 'bout extending proxies to provide an introspection API?
From: Tom Van Cutsem tomvc...@gmail.com
To: es-discuss es-discuss@mozilla.org
Sent: Thu, October 28, 2010 6:02:11 AM
Subject: instanceof trap and default handler for Proxies
Hi,
I created a strawman
I assume the answer is no, but can one proxy simple modules?
From: Tom Van Cutsem tomvc...@gmail.com
To: es-discuss es-discuss@mozilla.org
Sent: Thu, October 28, 2010 6:02:11 AM
Subject: instanceof trap and default handler for Proxies
Hi,
I created a strawman
20 matches
Mail list logo