2 ms·
I disagree with the "sub-optimal" label... Tcl, Lua, Ruby, $whatever are amplifiers for C. Arguably especially in the cases your citing. With libcurl, you want
by bch 14y ago
I disagree with the "sub-optimal" label... Tcl, Lua, Ruby, $whatever are amplifiers for C. Arguably especially in the cases your citing. With libcurl, you want handy, dynamic string handling for parsing results, or doing ad-hoc requests. With libxml I -suspect- that any DOM parsing or XPath work, etc is the only "heavy lifting" component, and easily driven by a higher level scripting language. In use, there's no cost, because areas where a scripted language fails compared to C (performance, low-level bit-fiddling) are not at all applicable in the scripted domain. Conversely the scripted environment brings a comfortable interface to the user, highly dynamic and, like Unix pipes, allow bringing new functionality into the scripted domain and interacting with that universe (bind ruby to curl, do a bunch of ad hoc tests in the REPL, slurp up a list of URLs from a textfile, report all 404s to a database).
Driving libxml or libcurl from C doesn't give this multiplier effect. Not that there's no reason to use C, but there are -easy- to identify reasons for using a higher level language. Whether the cost of integrating the two paradigms is worth it depends on the developer, and how they determine value.