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:

    Call them rules or call them limits, good ones, I believe, have this in common: They serve reasonable purposes; they are practical and within a child’s capability; they are consistent; and they are an expression of loving concern.
    Fred Rogers (20th century)

    Philosophical questions are not by their nature insoluble. They are, indeed, radically different from scientific questions, because they concern the implications and other interrelations of ideas, not the order of physical events; their answers are interpretations instead of factual reports, and their function is to increase not our knowledge of nature, but our understanding of what we know.
    Susanne K. Langer (1895–1985)