Semipredicate Problem - Practical Implications

Practical Implications

In the case of division, a convention could be put into place requiring the caller to verify the validity of the input before calling the division function. This is undesirable for two reasons. First, it greatly encumbers all code that performs division. Second, it violates the important principle of encapsulation in programming, whereby treatment of concerns should be contained to one place. If we imagine a more complicated computation than division, the caller may not even know that invalid input is being handed to the target function; indeed, figuring out that the input is invalid may be as costly as performing the entire computation.

Read more about this topic:  Semipredicate Problem

Famous quotes containing the words practical and/or implications:

    No delusion is greater than the notion that method and industry can make up for lack of mother-wit, either in science or in practical life.
    Thomas Henry Huxley (1825–95)

    The power to guess the unseen from the seen, to trace the implications of things, to judge the whole piece by the pattern, the condition of feeling life in general so completely that you are well on your way to knowing any particular corner of it—this cluster of gifts may almost be said to constitute experience.
    Henry James (1843–1916)