change: Use error object instead of sentinel -1 #1340
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
change 1.3.0
As proposed in
#1313
#905 (comment)
In contrast to the proposal in
#336 (comment)
Although -1 is a sentinel value, the sentinel value had been overloaded
in this JSON file to mean two separate conditions:
with a different set of coins)
always invalid)
To make clear that these two conditions are different, we use an error
object describing each.
This error object was defined in
#401
Note that this commit is not a decree that all languages must represent
these conditions as errors; languages should continue to represent the
conditions in the usual way for that language. It is simply a
declaration that these two conditions bear enough consideration that
we'll represent them with a different type and also clearly
differentiate between the two.
Closes #1313
Checks the related box in #1311