Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-11 Thread Boris Zbarsky
On 5/11/14, 3:40 PM, Tab Atkins Jr. wrote: Note, though, that WebIDL *does* have things that can act like "abstract base classes" Does it? Can you point me to one other than MapClass? -Boris

Re: RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-11 Thread Tab Atkins Jr.
[random interjection] On Sun, May 11, 2014 at 9:41 PM, Domenic Denicola wrote: > Part of the issue is might be that you are seeing things in terms of > TypeScript, instead of in terms of JavaScript. In JavaScript, those generic > type parameters are meaningless, and the entire idea of a "interf

RE: RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-11 Thread Domenic Denicola
From: 송정기 [mailto:jungkee.s...@samsung.com] > Promise already abstracts that async operation. AsyncMap is just a Map that > runs async. No more no less. It does get/set/... the entry exactly the same > way as Map does but returning Promise that resolves with the value. That doesn't really addr

Re: RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-10 Thread Anne van Kesteren
On Fri, May 9, 2014 at 9:18 PM, Rick Waldron wrote: > Pardon me if I've missed some important context, but why would keys, values > and entries return a Promise when the ES APIs of the same name return an > Iterator? Looks like you missed "async". However, for AsyncMap it seems like you'd need As

Re: RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-09 Thread Rick Waldron
On Fri, May 9, 2014 at 3:59 AM, 송정기 wrote: > Jungkee wrote: > > > Right. We're defining an AsyncMap interface [1] which Cache interface > and CacheList interface are based off of. AsyncMap isn't spec'd yet in any > place than in the .ts file. A difficulty encountered is we don't have any > IDL co

Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-09 Thread Boris Zbarsky
On 5/9/14, 4:20 AM, 송정기 wrote: > Providing base interface for Cache interface Yes, but what does that actually mean in practice? Will there be AsyncMap.prototype methods that can operate on any AsyncMap instance including Cache? What would those methods do? > Regarding the implication to ES, I

Re: Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-09 Thread 송정기
Jungkee wrote: >> Right. We're defining an AsyncMap interface [1] which Cache interface >> and CacheList interface are based off of. AsyncMap isn't spec'd yet in >> any place than in the .ts file. A difficulty encountered is we don't >> have any IDL construct for this yet. Any suggestion? Boris wr

RE: RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-09 Thread 송정기
Jungkee wrote: > > Right. We're defining an AsyncMap interface [1] which Cache interface and > > CacheList interface are based off of. AsyncMap isn't spec'd yet in any > > place than in the .ts file. A difficulty encountered is we don't have any > > IDL construct for this yet. Any suggestion? Bt

Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Boris Zbarsky
On 5/9/14, 12:26 AM, Jungkee Song wrote: Right. We're defining an AsyncMap interface [1] which Cache interface and CacheList interface are based off of. AsyncMap isn't spec'd yet in any place than in the .ts file. A difficulty encountered is we don't have any IDL construct for this yet. Any sugge

RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Domenic Denicola
From: Jungkee Song [mailto:jungk...@gmail.com] > Right. We're defining an AsyncMap interface [1] which Cache interface and > CacheList interface are based off of. AsyncMap isn't spec'd yet in any place > than in the .ts file. A difficulty encountered is we don't have any IDL > construct for th

Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Jungkee Song
On May 9, 2014 12:18 PM, "Boris Zbarsky" wrote: > > I'm looking at https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-listhere. > > The point of [MapClass] (assuming [MapClass] stays in the WebIDL spec at all) is to declare interfaces that quack enough like Map that i

Re: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Boris Zbarsky
On 5/9/14, 12:14 AM, Domenic Denicola wrote: As an aside, I filed https://github.com/heycam/webidl/issues/11 regarding [MapClass]. Yeah, agreed. ArrayClass makes sense, because the Array methods are generic. But MapClass as currently specced just doesn't. -Boris

RE: It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Domenic Denicola
Agreed, this was odd to me. As an aside, I filed https://github.com/heycam/webidl/issues/11 regarding [MapClass]. -Original Message- From: Boris Zbarsky [mailto:bzbar...@mozilla.com] Sent: Thursday, May 8, 2014 23:15 To: public-webapps Subject: It doesn't make sense to use [Map

It doesn't make sense to use [MapClass] for the CacheList interface

2014-05-08 Thread Boris Zbarsky
I'm looking at https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-list here. The point of [MapClass] (assuming [MapClass] stays in the WebIDL spec at all) is to declare interfaces that quack enough like Map that it makes sense to have them be instanceof Map and h