Re:Never create Ruby strings longer than 23 characters
by vidarh on Thursday December 12, 2013 @04:27AM
(#6893614)
Look up a C++ string implementation sometime, and you'll find that this is almost exactly how most efficient C++ string implementations do this too.
And it doesn't need to alternate between length specified or null terminated - they're all length specified (or how do you think short Ruby strings are also able to store ASCII NUL)
And it doesn't need to alternate between length specified or null terminated - they're all length specified (or how do you think short Ruby strings are also able to store ASCII NUL)