3 ms·
It's true that on platforms where strdup is supported, the C example could be written more succinctly with strdup. But strdup isn't part of the ANSI/ISO standar
by mwcampbell 8y ago
It's true that on platforms where strdup is supported, the C example could be written more succinctly with strdup. But strdup isn't part of the ANSI/ISO standard, at least according to the man page on Ubuntu 16.04. And even when using strdup, you can't get away from manual memory management; you still have to call free (or strfree) afterward.
Furthermore, the field of programming is so vast that it's unreasonable to expect someone to know every nuance of a given language, especially if it's one that they don't use heavily.
So I don't think there's any good reason to dismiss the whole article as nonsense.