News for hackers. Stuff that matters.
Re:Walter Bright on C's Biggest Mistake by nitrogen on Friday December 25, 2009 @02:16PM (#1015210)
Storing size separately from the character data, rather than as a prefix to the character data, would indeed alleviate some of the potential problems of a size+data string. I could see myself using such an implementation in situations where the minimal overhead of allocating a separate area on the stack or heap for the size+pointer struct is negligible. Expanding strings would certainly be a lot easier, and it would open the posibility (as you mentioned) for complex data sharing among strings, similarly to Qt4.

There are no comments on this comment yet.