logoalt Hacker News

direwolf20today at 12:31 AM1 replyview on HN

Automatic memory accounting — construct/copy/destruct. You can't abstract these in C. You always have to call i_copied_the_string(&string) after copying the string and you always have to call the_string_is_out_of_scope_now(&string) just before it goes out of scope


Replies

ueckertoday at 6:37 AM

This seems orthogonal to std::string. People who pick C do not want automatic memory management, but might want better strings.

show 1 reply