Re:C++ design goals in the context of Rust (2010)
by nwmcsween on Saturday June 21, 2014 @11:15PM
(#7926783)
Pointer, length or start pointer end pointer has overhead multiplied across n strings may even become larger than the strings themselves!
Re:C++ design goals in the context of Rust (2010)
by WalterBright on Sunday June 22, 2014 @10:02PM
(#7929847)
Over a decade of experience with this in D shows that it's a significant net win.
Of course, a C program doesn't have to use C strings, but so many libraries and APIs do (including the C standard library) that they are unavoidable for most practical purposes.
D eliminates this problem by using dynamic arrays to represent strings. A dynamic array is a pointer/length pair.