On 07/13/2012 02:47 PM, Dave Mandelin wrote:
> And I don't want to bikeshed on stuff if it is not important, but
> 'Rooted<T>' still sounds weird to me. It sounds like a name that
> would be used in a parameter to indicate that something is rooted
> (but we call that Handle, which is fine, and better). 'Root<T>' is
> better, but something that is more suggestive of how to use the thing
> than a GC implementation term would be better yet. Maybe GCPtr<T>?
> MovablePtr<T>?

Having to update old code a lot lately, I'd really just prefer Local<>
which is easy to type and describes exactly what it is (a local
variable). V8 uses this name too. (And we should specialize it to remove
the * in the type.)

FWIW, I'm not doing GC work but I think our Handle approach makes a lot
of sense. It has small usability disadvantages (that are slowly
disappearing) but it seems much better given our engine design. And
it'll always be possible to introduce V8-style handles at the public API
level - and in fact while V8 technically has one method of allocating
handles, they really have two separate type systems for managing them
internally versus externally.

-David
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to