Are there any proposals for Tuples?

Brendan Eich brendan at
Wed Apr 10 19:07:32 PDT 2013

Mark S. Miller wrote:
> On Wed, Apr 10, 2013 at 6:48 PM, Brendan Eich <brendan at 
> <mailto:brendan at>> wrote:
>     Yeah, I wrote
>     which included tuples, but after an initially warm reception, TC39
>     settled down to more incemental moves, and binary data emerged.
>     We've been thinking along the following lines since then,
>     apologies for brevity:
>     With new Uint32Array(4) you get a reference type instance. Just as
>     with typed arrays today, but same goes for structs as for arrays.
>     With Uint32Array(4) -- note lack of 'new' oeprator -- you would
>     get an immutable value type, which could be stack allocated if
>     escape analysis allows. This is for the VM to worry about. It's
>     the JS way.
> I like where this is going. But how did the array returned by 
> Uint32Array(4) get initialized?

Same as with typed arrays today:

js> a = Uint32Array(4)
({0:0, 1:0, 2:0, 3:0})

> Could these be the same as the ParallelArrays used by rivertrail? They 
> can be safely shared between workers for the same reason they can be 
> safely shared between threads within an event loop.

This seems possible, but I defer to Dave, Niko, and Rick.


More information about the es-discuss mailing list