|
|
|
|
|
by dragonwriter
3428 days ago
|
|
It actually has a lot to do with types; while it can occur in a few other situations, the two biggest places it occurs: (1) Where ints (or some other enumerable value unrelated to the problem domain) are used in place of self-describing enumerations because of lack of type system support for enums. (2) When values within the domain of a type but outside of the domain that would otherwise be generated are used to signal special situations because of lack of type system support for sum types. (The main other place that they occur is with "breakpoints" within a domain of a normal type, but even these are arguably a workaround for the absence of the combination of sum types and range-constrained types.) |
|