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:

    The city is always recruited from the country. The men in cities who are the centres of energy, the driving-wheels of trade, politics or practical arts, and the women of beauty and genius, are the children or grandchildren of farmers, and are spending the energies which their fathers’ hardy, silent life accumulated in frosty furrows in poverty, necessity and darkness.
    Ralph Waldo Emerson (1803–1882)

    When it had long since outgrown his purely medical implications and become a world movement which penetrated into every field of science and every domain of the intellect: literature, the history of art, religion and prehistory; mythology, folklore, pedagogy, and what not.
    Thomas Mann (1875–1955)