On Mon, 28 Jun 2010 20:55:53 -0400, Roy Smith wrote:

> The nice thing about null-terminated strings is how portable they have
> been over various word lengths.  Life would have been truly inconvenient
> if K&R had picked, say, a 16-bit length field, and then we needed to
> bump that up to 32 bits in the 80's, and again to 64 bits in the 90's.

Or a Pascal 8 bit length field.

However the cost of null-terminated strings is that they can't store 
binary data, and worse, they're slow. In fact, according to some, null-
terminated strings are the *worst* way to implement a string type.

http://www.joelonsoftware.com/articles/fog0000000319.html



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to