On Fri, May 14, 2010 at 10:06, Allen Wirfs-Brock <[email protected]> wrote: > What's your use case for a variable length ArrayBuffer?
I'm happy with fixed length array buffer but exceptions rubs me the wrong way. Consistence with Array leads to less surprises which leads to less bugs. > These are the sorts of trade-offs that library writers should be making. > They can decided if it is more appropriate to build an abstraction that that > grows by copying (probably best for infrequent growth and lots of iterative > operations) or grows by segmentation (probably better for frequent growth > with minimal iteration). They can even include both in a library. > > The core language should be providing the primitive that enable this sort of > library design while minimizing low level overhead. From that perspective I > think a fixed size ArrayBuffer is exactly what is needed. However, it is > also important that efficient copying is supported, possibly via a > ArrayBuffer constructer alternative. I agree that we need to provide the missing primitives, however; If we only provide the primitives usability will suffer. If we only provide primitives all js libraries will have to reimplement a usable abstraction layer. This is leads to more code which leads to higher latency and slower application. -- erik _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

