Re:I write games in C (yes, C)
by uecker on Sunday February 08, 2026 @01:37AM
(#46931860)
This seems orthogonal to std::string. People who pick C do not want automatic memory management, but might want better strings.
[ Parent
| on HN ]
Re:I write games in C (yes, C)
by direwolf20 on Sunday February 08, 2026 @05:01AM
(#46932933)
Automatic memory management is literally what makes them better
For many string operations such as appending, inserting, overwriting etc. the memory management can be made automatic as well in C, and I think this is the main advantage. Just automatic free at scope end does not work (without extensions).
Re:I write games in C (yes, C)
by direwolf20 on Sunday February 08, 2026 @11:11AM
(#46935562)
You can make strings (or bignums or matrices) more convenient than the C default but you can never make them as convenient as ints, while in C++ you can.
Yes, but I do not think this is a good thing. A programming language has to fulfill many requirements, and convenience for the programmer is not the most important.
Re:I write games in C (yes, C)
by direwolf20 on Sunday February 08, 2026 @05:37PM
(#46939290)
Empirically it is. All the most used languages are the most convenient ones.