W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

RE: [IndexedDB] Spec changes for international language support

From: Keean Schupke <keean@fry-it.com>
Date: Wed, 23 Mar 2011 00:33:51 +0000
Message-ID: <AANLkTikmkmVd1H-UmObCHqPWBjxtj9_iP7ctbzj4Rb0s@mail.gmail.com>
To: Pablo Castro <Pablo.Castro@microsoft.com>
Cc: Jonas Sicking <jonas@sicking.cc>, public-webapps WG <public-webapps@w3.org>, Keean Schupke <keean@fry-it.com>, Bjoern Hoehrmann <derhoermi@gmx.net>, Jungshik Shin <jshin@chromium.org>
IMHO not the job of Idb to store the callbacks, so I don't see this
complexity as a reason not to implement the API using callbacks. I think
having one consistent API is more important.

Specifying the collation 'name' has all the same problems as callbacks
(needs to be re-done on every page, possibility of using different
collations on different pages).

Really a 'function' is just a symbol for a collation. A function name, is a
better symbol for a collation than a string. Function's have a uniqueness
property strings do not. So specifying a function as the collations instead
of a string really is the same thing. Consider below:


// version 1

var test1 = function(a) {

    if (a === 'x') { /*X*/ } else if (a === 'y') { /*Y*/ }

};

test1('x');

test1('y');


// version 2

var x = function() {};

var y = function() {};

var test2 = function(a) {

    if (a === x) { /*X*/ } else if (a === y) { /*Y*/ }

}

test2(x);

test2(y);


Cheers,

Keean.


On Mar 22, 2011 10:44 PM, "Pablo Castro" <Pablo.Castro@microsoft.com> wrote:
Received on Wednesday, 23 March 2011 00:34:24 UTC

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