Forum OpenACS Q&A: Response to Top 20 DOs and DONTs while developing OpenACS

Posted by Lars Pind on
The reason we *weren't* using equal originally was that it didn't exist. string equal was introduced with Tcl 8.

string match does glob matching, with * and ? and [...] and that stuff, whereas string equal does an exact match. So (a) it's more precise, if what you want is straight-up-no-wildcards string comparison, and (b) it's presumably faster (I haven't looked at how it's implemented, but unless it's implemented using string match, you'd think that you'd save a few comparisons and special-cases for * and ? and [...] here and there).