3 ms·
Why is C 'supposed to be primitive?' If C was supposed to be so primitive, there wouldn't even be 'str' functions, it would just be memcpy functions and you wou
by pyre 16y ago
Why is C 'supposed to be primitive?' If C was supposed to be so primitive, there wouldn't even be 'str' functions, it would just be memcpy functions and you would be responsible yourself for keeping track of null terminators.
C just needs a bolstered set of string-handling functions. Much like C++ has the Boost libraries.
- AndrewMoffat 16y agoGLib supposedly has some pretty solid C base libraries for string handling and other common tasks. http://library.gnome.org/devel/glib/2.28/glib-String-Utility-Functions.html http://library.gnome.org/devel/glib/2.28/glib-String-Utility...
- lutorm 16y agoYeah, by "primitive", I meant "low level". (The strxxx functions aren't part of the language, after all. Like you say, one could write a better, more "object oriented" string library for C.)