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

Re: [Widgets] APIs and Events preference change

From: Marcos Caceres <marcosc@opera.com>
Date: Tue, 17 Mar 2009 12:29:18 +0100
Message-ID: <b21a10670903170429v34687d20v8c1bedd114522487@mail.gmail.com>
To: ivan.demarino@orange-ftgroup.com
Cc: scott.bradley.wilson@gmail.com, arveb@opera.com, art.barstow@nokia.com, public-webapps@w3.org
On Mon, Mar 16, 2009 at 7:15 PM,  <ivan.demarino@orange-ftgroup.com> wrote:
> I agree with Scott's concern.
>
> I'm not 100% up-to-speed with the latest modification to the HTML5 specs (if
> any) but I remember that this kind of "Rubyesque" way of accessing elements
> in the Storage is only present into the "attached usage examples", but there
> is none in the API described in the document.
>
> So far I would avoid to implement stuff like that: in Javascript there is
> nothing, grammatically speaking.
>
> There could be a way, manipulating the Prototype object, doing things like:
>
>     storageObject.setItem(key, value) {
>         /* STORING CODE - DEPENDENT ON THE IMPLEMENTATION */
>         this.prototype.__defineGetter__(key, function() { /* CODE TO
> RETRIEVE THA VALUE FROM THE STORAGE - DEPENDENT ON THE IMPLEMENTATION */ });
>     }
>
> But I don't see it as very efficient and clean.
> I'm more for a "Java-ish"/classic set/get solution.
>

I'm also in favor of more classical java-ish intefaces, but they don't
seem to fit current design patterns employed by JavaScript.... in
other words, even though they look nasty, they are extremely flexible
and are well suited to the way javascript is written. I guess
JavaScript won't ever be like Java (both happy and sad about that all
at once :) ) Anyway, we will see what Hixie and/or Anne say.

Kind regards,
Marcos

-- 
Marcos Caceres
http://datadriven.com.au
Received on Tuesday, 17 March 2009 11:29:59 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:30 GMT