171
edits
No edit summary |
m (grammar, spelling, active voice, some clarifications in the introduction) |
||
Line 1: | Line 1: | ||
This proposal was written by Daniel Friesen as an alternative to the Binary/B proposal. | This proposal was written by Daniel Friesen as an alternative to the [[ServerJS/Binary/B|Binary/B]] proposal. | ||
This proposal extends the Blob type that a number of existing Server-side JavaScript implementations use, and a Buffer type reflecting the StringBuffer/StringBuilder within Java. | |||
implementations, | |||
This proposal has a Buffer instead of Binary/B's ByteArray. None of the prior art actually implemented a ByteArray as Binary/B proposes. Most implementations implemented a Blob type similar to Binary/B's ByteString, and any that implemented something called ByteArray actually implemented something more like a stream API based buffer rather than | |||
art actually implemented a ByteArray as Binary/B proposes. Most implementations | anything remotely resembling an Array. | ||
implemented a Blob type, and any that implemented something called | |||
actually implemented something more like a stream API based buffer rather than | |||
anything remotely resembling an | |||
One of | One goal of this proposal is interoperability between Strings and Blobs. That is, like Binary/B, this proposal aims to permit a class of generic algorithms that can operate on both Blob and String through a generic intersection between their API's. However, unlike Binary/B, this proposal avoids things that seem counter-intuitive, like putting .charAt on a Blob, a byte collection. Instead, this proposal augments String with a .valueAt so that method can be used generically on both Blob and String. | ||
This proposal is based off of API's drafted for MonkeyScript ([http://draft.monkeyscript.org/api/_std/Blob.html Blob] [http://draft.monkeyscript.org/api/_std/Buffer.html Buffer]). | |||
== Terms == | == Terms == |
edits