Friday, November 9, 2007

Strings

Strings are really beginging to annoy me. People need to think when they design API's if strings are really the best thing to use.
String are for reading, for humnas to read.
I am using a system where most of the strings should be replaced with enum or custom value. the reduction in runtime errors would be significant.
i have to campare time code in one exapmle, these are in string format. i now need to know and understand the other applications time code format so i can do a comparison instead of using
if(timecodeA > timecodeB)
{
//DO LOGIC
}
which would be the logical thing to do.

No comments: