James Burke (2013-11-03T18:03:46.000Z)
With the import/export mutable slots concept, does it make sense to
allow an API that has expresses that type of concept? I think it would
allow creating a module-function thunk that would allow robust cycles
as mentioned here:

https://mail.mozilla.org/pipermail/es-discuss/2013-November/034576.html

So something that returns a value, but when it is looked up by the
engine, it really is just an indirection to some other value that can
be set later. Call it IndirectValue for purposes of illustration, but
the name is not that important for this message:

var value = new IndirectValue();

// something is a kind of "ref to a ref" engine type under the covers
var something = value.ref();

typeof something === 'undefined' // true at this point

// Some time later, the code that created the
// IndirectValue sets the final value for it.
value.set([100, 200]);

// Then later,
Array.isArray(something) // true now

IndirectValue.prototype.set() could only be called once, and the
engine under the covers could optimize the indirections after the
set() is called so that the indirection would not longer be needed.

James
domenic at domenicdenicola.com (2013-11-04T09:03:29.396Z)
With the import/export mutable slots concept, does it make sense to
allow an API that has expresses that type of concept? I think it would
allow creating a module-function thunk that would allow robust cycles
as mentioned here:

https://mail.mozilla.org/pipermail/es-discuss/2013-November/034576.html

So something that returns a value, but when it is looked up by the
engine, it really is just an indirection to some other value that can
be set later. Call it IndirectValue for purposes of illustration, but
the name is not that important for this message:

```js
var value = new IndirectValue();

// something is a kind of "ref to a ref" engine type under the covers
var something = value.ref();

typeof something === 'undefined' // true at this point

// Some time later, the code that created the
// IndirectValue sets the final value for it.
value.set([100, 200]);

// Then later,
Array.isArray(something) // true now
```

`IndirectValue.prototype.set()` could only be called once, and the
engine under the covers could optimize the indirections after the
`set()` is called so that the indirection would not longer be needed.