Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Erik Corry
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Brendan Eich
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Erik Corry
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

RE: Concerns about weak refs and weak maps.

2010-10-29 Thread Allen Wirfs-Brock
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread P T Withington
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Brendan Eich
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Brendan Eich
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread felix
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

RE: Concerns about weak refs and weak maps.

2010-10-29 Thread Allen Wirfs-Brock
-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

RE: Concerns about weak refs and weak maps.

2010-10-29 Thread Allen Wirfs-Brock
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

RE: Concerns about weak refs and weak maps.

2010-10-29 Thread Jim Deville
-discuss-boun...@mozilla.org] On Behalf Of Allen Wirfs-Brock Sent: Friday, October 29, 2010 3:04 PM To: Allen Wirfs-Brock; felix; Brendan Eich Cc: Andreas Gal; es-discuss Subject: RE: Concerns about weak refs and weak maps. Oops, typo fixed below -Original Message- From: es-discuss-boun

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread felix
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

Re: Concerns about weak refs and weak maps.

2010-10-29 Thread Brendan Eich
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:

Re: Concerns about weak refs and weak maps.

2010-10-28 Thread Brendan Eich
On Oct 28, 2010, at 2:10 PM, Hudson, Rick wrote: I have concerns about weak refs and weak maps, one concern related to usability, one related to performance bugs, and another other related to changing the complexity of the GC algorithm. Hi Rick, your comments are on target, but I'll differ

RE: Concerns about weak refs and weak maps.

2010-10-28 Thread Hudson, Rick
: Brendan Eich [mailto:bren...@mozilla.com] Sent: Thursday, October 28, 2010 2:39 PM To: Hudson, Rick Cc: es-discuss; Andreas Gal Subject: Re: Concerns about weak refs and weak maps. On Oct 28, 2010, at 2:10 PM, Hudson, Rick wrote: I have concerns about weak refs and weak maps, one concern related

Re: Concerns about weak refs and weak maps.

2010-10-28 Thread Brendan Eich
On Oct 28, 2010, at 5:41 PM, Hudson, Rick wrote: Hi Brendan, I think we all agree that EcmaScript, the language, should not contain threads with shared memory constructs such as locks or transactions. We seem to disagree as to whether EcmaScript, the implementation, should be