3 ms·
I don't subscribe to the 'it is expensive so it should be painful' line of thought. That's how you end up with cstrings, strcpy, strdup and friends.
by gpderetta 4y ago
I don't subscribe to the 'it is expensive so it should be painful' line of thought. That's how you end up with cstrings, strcpy, strdup and friends.
- jstimpfle 4y agoNo, strdup uses a general purpose allocator to put a string in a random place on the heap. Quite the opposite of a well-structured approach. "It is complicated so let's see if there is a simpler approach".