logic of exception

Page 133

133

what was intended. Really, the computer user already typed some strings and the actual symbol for concatenation. Shouldn’t a smart computer be able to guess (as a default solution) in the first case that concatenation of “abc” and “cde” is intended ? (It might test whether cde is a variable.) What now is programmed seems inefficient and confusing, and a good rule for programmers is that you shouldn’t program for others what you wouldn’t want to be programmed to yourself. A more user friendly approach would be to create that concatenation and report “OK, your input wasn’t all up to standards as we perceive them, but we made a guess: if it isn’t right, please correct it, and, if you follow our syntax then you don’t get messages like this.” Actually, it is already a step ahead in politeness that these messages aren’t called “error” messages. An “error” in this case is only a difference of opinion on what syntax is acceptable. This is just an example. What counts is the philosophy. (a) Dealing with exceptions to systems that you design. (b) Truthvalues of nonsense (given some syntax). Of course, in the concatenation example, we require context-dependency. If this entering of code was your last try at the password that you forgot for your banking account, then perhaps you would be happy with some degree of strictness. And of course, hoping for user-friendliness is also a form of strictness. It would perhaps be too much to demand that there be whole company departments staffed with people trying to guess what would be the hidden meaning of input “errors” (i.e. caused by syntax of other departments). (This becomes complex. Perhaps it is better to become completely cynical and not care about anything anymore. Let us quickly move on to inference.)


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.