4 ms·
I think the more appropriate advice is don't hard code strings anywhere in your source. Sometimes using such strings is unavoidable and the most practical thing
by magsafe 14y ago
I think the more appropriate advice is don't hard code strings anywhere in your source. Sometimes using such strings is unavoidable and the most practical thing to do (e.g bundle IDs in iOS apps). But if you have to use such strings, define them ONCE in one header file, plist file, or similar and use the reference everywhere else. I've used this successfully through several ownership changes of several apps across several platforms, and always found it to be a minimal, trivial problem - as long as the strings are cleanly #defined in one place.