On Thu, Sep 11, 2008 at 11:44 AM, Chris Prince <[EMAIL PROTECTED]> wrote: > (2) I'm not sure about the model. I feel like Blobs have been moving > toward parallelism with Strings / Arrays, and that seems like a good > path to continue down.
Strings and arrays are different. Arrays are mutable, strings are not. I'm not sure what you're getting at here. Gears blobs are like strings, not like arrays. > For example, most methods that today take a String could instead > accept a StringOrBlob. Both objects represent a chunk of immutable > data; it just happens to be text- or binary-based data. > > Instead of 'StringBuilder' or 'ArrayBuilder' classes, there are > methods like concat(). Couldn't we add Blob.concat(), and let it > accept a String or Blob? Many languages and frameworks that have immutable strings also have StringBuilders. Off the top of my head, I know that Java and .Net both have this. There are probably others. JavaScript doesn't, but I don't think that by itself should rule it out. > A nice advantage of that approach is that it's more likely to be > accepted by standards bodies, I think. (In the standards discussions, > the Blob is sometimes thought of as "immutable ByteArray".) I don't think there's much difference here as far as future standardization goes. Is there any difference insofar as performance? - a
