Tuesday, October 20, 2015

String Interfaces

Ted Unangst (via Jeremy W. Sherman):

Although using strings subverts C’s already weak type checking, that’s probably not a major concern. One can screw up bit masks by using || in place of |. Or, as above, one can incorrectly pack the magic array. It’s usually much easier to visually audit a string than the C code used to plaster a dozen option together.

Of course, one should not use a string interface if it doesn’t make sense, but we need not reject the concept out of hand without at least some consideration.

Another example is libclang.

1 Comment RSS · Twitter


"Yo dawg, we herd u like reckless cowboy languages in ur reckless cowboy languages..."

Leave a Comment