On Sat, Aug 18, 2012 at 10:31:32AM -0700, Nathan Rajlich wrote:
> 
> On Sat, Aug 18, 2012 at 7:57 AM, Alan Gutierrez <[email protected]> wrote:
> > When I write beyond the end of a `Buffer`, nothing bad happens. I'm 
> > expecting a
> > earth-shattering kaboom, or at least an exception. I'm happier with the do
> > nothing behavior, but I'm wondering if there was any debate about whether 
> > or not
> > an exception should be raised when an is out of range. If so, what was the
> > reasoning behind do nothing?

> When you write past the "length" of a buffer, you're not actually
> writing to the underlying C buffer, you're just adding new numerical
> properties to the Buffer Javascript wrapper object.

Cool. Will it always be that way? I can imagine someone arguing that writing
beyond the end of a buffer should raise an exception and demand that range
checking be added to the `Buffer` object.

--
Alan Gutierrez - http://github.com/bigeasy - http://twitter.com/bigeasy

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to