Boris, I think we’re going in a couple circles here, so let’s not waste anymore 
time (though it’s a fascinating discussion.)  I think you’re complaints come 
down to:

1. Potential mis-use of API could make things slower
2. People assuming things could freeze behavior
3. People will assume behavior outside of the spec
4. What does GC mean?  People will assume everything.

Which I can understand your position, though I disagree, but that’s more 
philosophical, and not something we can probably debate down.  And I apologize 
if I mis-represent your argument here, but that’s the gist I get.

So let’s move it a little.  How about this concept:

A call that hints that next time control is released from a script, that it 
triggers whatever the next type of GC, whatever it is, of any of the methods, 
that would get triggered close to this time.  So:

// lots of code
System.stageMaybeGC();
setTimeout(blech,X);  // not necessarily this, but just anything that will 
release control

blech() {}      // maybe you got a GC

Now, it might be a minor GC, but I can stage these after every complex 
operation that makes a lot of objects.  At this point, I’m not interrupting or 
pausing or doing GCs the system wouldn’t do in it’s normal operation.  The 
system can also say “hey, a GC here would be bad, I’m not going to do it” and 
skip it.  Or the system can go, “hey, I do have a lot of stuff, and the 
programmer knows this is a good time."

Control would be required to be released.  It’s maybe, and whatever it does is 
what the engine decides to do.  And you can’t misuse it because it forces you 
to release control, so nobody can use it in a tight loop (well, they could, but 
it would be super, duper dumb.)

Thoughts?

[>] Brian


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to