W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 12 May 2014 00:40:31 +0200
Message-ID: <CAAWBYDCa-O52Qs-sCoOGRgEhsYV8OOAdgrixvc3jWAmkb6mGMw@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: "jungkee.song@samsung.com" <jungkee.song@samsung.com>, "bzbarsky@mozilla.com" <bzbarsky@mozilla.com>, "public-webapps@w3.org" <public-webapps@w3.org>
[random interjection]

On Sun, May 11, 2014 at 9:41 PM, Domenic Denicola
<domenic@domenicdenicola.com> 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 "interface" is meaningless. In JavaScript, there are constructible classes, and nothing else.
>
> The design you outline seems to be toward some sort of "abstract base class" idea, where there is no implementation of get/has/set/delete/forEach, but there is an implementation of "generic *async* Map operations", viz. clear/entries/keys/values. But JavaScript doesn't have abstract base classes!

Note, though, that WebIDL *does* have things that can act like
"abstract base classes", and that's exactly what [MapClass] does.
It's meant to be a guide for consistent designs, and also happens to
provide default implementations of some things for convenience.

~TJ
Received on Sunday, 11 May 2014 22:41:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC