Proposal to add fallback behaviour to map:get and array:get - #289
Merged
Conversation
ChristianGruen
approved these changes
Dec 17, 2022
Contributor
|
The |
ChristianGruen
approved these changes
Jan 30, 2023
michaelhkay
force-pushed
the
Issue278-array-bound-checking
branch
from
February 4, 2023 15:14
9ed9390 to
7944df5
Compare
| >same key</termref> as <code>$key</code>. If there is such an entry, it returns the associated value; | ||
| otherwise it returns an empty sequence.</p> | ||
| <phrase diff="chg" at="2022-12-16">if not, it invokes the supplied <code>$fallback</code> function, supplying | ||
| the requsted <code>$key</code> value as the argument, and returns the result of this call. |
Contributor
There was a problem hiding this comment.
requsted --> requested
| indicate that the key is not present in the map. The two cases can be distinguished by | ||
| calling <code>map:contains</code>.</p> | ||
| calling <code>map:contains</code><phrase diff="add" at="2022-12-16">, or by using | ||
| a <code>$fallback</code> function to return a value is known never to appear in the map</phrase>.</p> |
Contributor
There was a problem hiding this comment.
value is known --> value known
Contributor
|
We agreed to accept this PR at meeting 021. Joel will submit a different PR for the subsequently identified editorial issues. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note: I got a build failure trying to build this, it's doing DTD validation but there are invalidities, unrelated to the changes I made.