Code Consistency – Critical For Practical Polymorphism
One of the challenges of good polymorphic design is code consistency. We are building a way to communicate with developers. Therefore, our language or syntax needs to be easy to understand. Likewise, we need to set and meet expectations properly. Code Consistency In Results The most common error I find in this area of coding is found in the values returned. When we stick to native types and numbers, it tends to be easy enough to stay consistent. However, strings and structures lend themselves to issues. For example, an address can have many properties and formats. We may be able to start with an output of: “address line, city, state zip.” However, addresses vary. What happens when we want to... Read more