Erik Arvidsson (2013-07-31T15:36:45.000Z)
One way could be to have a shared module with the symbol that both
w1.1 and w1.2 uses.

// w-symbols.js
export let foo = Symbol();

// w-1.1.js
import {foo} from 'w-symbols';
...

// w-1.2.js
import {foo} from 'w-symbols';
...

Other options include storing the symbol in some kind of global
registry (which the module registry is doing above).


On Wed, Jul 31, 2013 at 11:03 AM, Mark Miller <erights at gmail.com> wrote:
> This point is important enough that I'm resending as the start of a new
> thread.
>
>
> On Wed, Jul 31, 2013 at 7:50 AM, Mark S. Miller <erights at google.com> wrote:
>>
>>
>> In thinking about this, I become ever more puzzled about the versioning
>> and inter-realm problems for user-defined unique symbols -- I think it may
>> be a train wreck. Scenario: Library W version 1.1 defines and uses a unique
>> symbol @foo which is loaded into realm A. Library W version 1.2 purposely
>> intends to continue to define and use the "same" unique symbol @foo, so that
>> W1.2 code can successfully handle instances of W1.1 code. Library W1.2 is
>> loaded into realm B. The two realms come into contact, and objects from the
>> two W's come into contact. How did they both coordinate to define and use
>> the same @foo symbol?
>
>
>
>
> --
>   Cheers,
>   --MarkM



-- 
erik
domenic at domenicdenicola.com (2013-08-05T15:06:16.880Z)
One way could be to have a shared module with the symbol that both
w1.1 and w1.2 uses.

```js
// w-symbols.js
export let foo = Symbol();

// w-1.1.js
import {foo} from 'w-symbols';
...

// w-1.2.js
import {foo} from 'w-symbols';
...
```

Other options include storing the symbol in some kind of global
registry (which the module registry is doing above).