Make interfaces programmatic rather than semantic when possible. Each interface consists of a programmatic part and a semantic part. The programmatic part consists of the data types and other attributes of the interface that can be enforced by the compiler. The semantic part of the interface consists of the assumptions about how the interface will be used, which cannot be enforced by the compiler. [...] Look for ways to convert semantic interface elements to programmatic interface elements by using Asserts or other techniques.
Steve McConnell, Code Complete, Second Edition
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment