W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: Flags for getFile/getDirectory (Re: New draft of FileSystem API posted)

From: Darin Fisher <darin@chromium.org>
Date: Tue, 7 Sep 2010 22:06:11 -0700
Message-ID: <AANLkTi=88a6_q9SN3FP=VOuWdBgdwQ=coJ=ShO17y_Sx@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Adam Barth <w3c@adambarth.com>, Eric Uhrhane <ericu@google.com>, Kinuko Yasuda <kinuko@chromium.org>, Web Applications Working Group WG <public-webapps@w3.org>, Robin Berjon <robin@berjon.com>
On Tue, Sep 7, 2010 at 8:41 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Tue, 7 Sep 2010, Adam Barth wrote:
> >
> > I think the bitfield approach is better.  The current approach doesn't
> > work very well in strongly typed languages.  Although we might think
> > that these APIs will be used most-often from JavaScript, these APIs are
> > language neutral and should work in a variety of settings (e.g., as part
> > of the NPAPI).  Baking in assumptions that APIs are used by dynamically
> > typed language isn't good for the web platform in the long term.
>
> The APIs don't have to be identical in each language. For example, I would
> expect a C++ port of ValidityState:
>
>
> http://www.whatwg.org/specs/web-apps/current-work/complete.html#validitystate
>
> ...to be implemented as a bitfield with constants, rather than as an
> object with fields. Should anyone want to implement that interface in such
> a language, then would be a time to provide suitable IDL for that case.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>
>

Slight tangent....

Based on the ValidityState example, it seems that the members of Flags
should be camelCase then instead of UPPERCASE?

-Darin
Received on Wednesday, 8 September 2010 05:06:42 GMT

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