Blob/File naming

On Monday, August 30, 2010 1:09 PM, Jonas Sicking wrote:
> On Mon, Aug 30, 2010 at 9:59 AM, Arun Ranganathan <arun@mozilla.com>
> wrote:
> > *sigh.  Naming continues to be hard.  Not everyone's thrilled with the
> > proliferation of Blob in the API [1] including other major implementors
> > (my co-editor included ;-))  but I changed it mainly due to Darin/Jian/other
> > objections.  I suppose you folks are pretty adamant on the Blob* name?
> 
> I feel pretty strongly that we should name this back to FileReader,
> for several reasons:
> 
> 1. Most people that I talk to dislike the name Blob, much less having
> it spread to things like BlobReader.
> 2. My understanding is that the writer counterpart is going to be
> called FileWriter (is this correct?)
> 3. While it's certainly possible to read Blobs with this, it seems to
> me like the far most common case will be to read a "real" file, or
> part of a file (i.e. the result from myfile.slice()).
> 4. There is one shipping implementation of FileReader

It's easy to bike shed on naming and I don't really want to get into that.
I'd prefer we just settled on something and stick to it. However I will
offer some observations from the conversations we've been having on this
topic.

I like the abstraction of Blob away from File with File being a concrete
implementation of the Blob interface. I suspect going back to just File
adds a bunch of unnecessary things to the cases where the data isn't file
backed. It seems there are a proliferation of specs that reference the Blob
concept. In fact the confusion in my conversations with people over the
name has been about a Blob here being more like a Stream than what they
traditionally think of as a BLOB (with a url property for example). We
think using Blobs with XHR and IndexedDB, say, will become at least as
common as their use for reading files from the file system.

Cheers,

Adrian.

Received on Tuesday, 31 August 2010 16:21:11 UTC