4 ms·
Because an array wouldn't be any safer than the string (still would be null-terminated or risk buffer overruns if you passed the length incorrectly), and using
by gecko 11y ago
Because an array wouldn't be any safer than the string (still would be null-terminated or risk buffer overruns if you passed the length incorrectly), and using a string means you don't have to import a pile of constants if you want to use tame from languages other than C.
- michaelmior 11y agoYou could use bit flags to avoid the array issue. Your point about constants is reasonable although given that it's a one-time cost and there are already automated tools to do this for many popular languages, I don't think it presents a real barrier. Edit: I see they originally use a bit mask and then changed to the space-separated string. http://www.tedunangst.com/flak/post/string-interfaces http://www.tedunangst.com/flak/post/string-interfaces