4 ms·
It should exist, in theory, but the type becomes moot in the presence of any dynamic input.
by mrfox321 5y ago
It should exist, in theory, but the type becomes moot in the presence of any dynamic input.
- AnimalMuppet 5y agoWell... either the type becomes meaningless, or the type becomes something that must be enforced in the presence of dynamic input. If your type says "an integer from 1 to 10", and you ask the user to enter a number from 1 to 10, and they enter 20, then something has to happen. If the compiler haa a routine that parses user input into "integer from 1 to 10" (or any range), then it has to either clip, wrap, or fail. If it doesn't, then you just parsed the user input into an int. When you try to stick that in your "integer from 1 to 10", one of the same things must happen. (Or, as you say, the type becomes moot.)