Designing a MultiMap (in DOM, would like to be consistent with ES)

Tab Atkins Jr. jackalmage at gmail.com
Mon Dec 3 10:22:32 PST 2012


On Mon, Dec 3, 2012 at 10:08 AM, Brandon Benvie
<brandon at brandonbenvie.com> wrote:
> Correct me if this stuff isn't actually going to end up as ES6, but my
> reading of meeting notes from July? indicate this is in:
>
> Instead of
>
>   import {Name} from '@name';
>   const keysName = new Name;  // These should be non global.
>   const valsName = new Name;
>   class MultiMap { ... }
>
> You can do
>
>   class MultiMap {
>     private @keys, @vals;
>     ....
>   }
>
> And change anything like "this[keysName]" to "this. at keys"
>
> Also "iterator" will be a public symbol (or whatever "public" ends up being
> named) that can be imported from '@iter'.

Yes, I was just copying the code from the current Map wiki page and
doing the minimal edits.  I'm aware that several parts of it have
changed, but didn't consider it worthwhile to figure out exactly what
to change it to.  You obviously knew what I meant.  ^_^

~TJ


More information about the es-discuss mailing list