Is "string-free coding" a common term?
design-patterns, java
Solution
This is the same thing as magic number vs constants. Using constants raises maintainability and readability. Constants also encapsulate change: a change in constant value is automatically propagated and, as for string-free coding, a misspelled constant is a compile-time error.
Problem
Recently i get in touch with Empire-db. The project doc. stated that they are using "string-free coding", intended to use less constant strings as possible to avoid typos and use the force of the compiler. I was always a big fan of this principle, because i think as Java is a formal language it could be expresive for configuration like properties or xml and gives extra value by checking thru the compiler. Maybe at runtime there are less posibilities to changes without recompiling but this depends on each case. Do you now more references or readings about this term/principle/design pattern ?