5 ms·
its still not as easy as in languages with modern libraries. a = "foo" + "bar"; is very useful so is b = a.split( "," ); or a = b.trim(); etc. C strings are ra
by jheriko 11y ago
its still not as easy as in languages with modern libraries.
a = "foo" + "bar"; is very useful so is b = a.split( "," ); or a = b.trim(); etc. C strings are rarely so convenient.
its more obvious with the more high level things you want. to do something like b = a.split( "," ); on a string that is not know until runtime you need dynamic allocations and you could use strtok to fill that memory with the results, but its an error-prone ballache by comparison.
- krapp 11y agoSomeone should totally build a dynamically typed language around C which is specifically meant for dealing with HTTP and serving HTML.
- kbenson 11y agoI still maintain that + is a terrible operator for concatenating strings, and results in quite a few types of bugs that are pervasive in many languages (usually from trying to automatically coerce non-matching operands).