Make Immutable.js comparison example more idiomatic and readable#14
Merged
rickbutton merged 2 commits intotc39:masterfrom Jun 2, 2020
acusti:patch-1
Merged
Make Immutable.js comparison example more idiomatic and readable#14rickbutton merged 2 commits intotc39:masterfrom acusti:patch-1
rickbutton merged 2 commits intotc39:masterfrom
acusti:patch-1
Conversation
• makes the example far more readable and illustrates a userland syntax that is comparable to the syntax in this proposal • the proposed revision works (a property path can traverse Maps and Lists), see: https://codesandbox.io/s/immutable-js-deep-path-properties-example-xqc9y • fixes a typo (“succient” → “succinct”) • adds a trailing comma to `state1` record in first example for consistency
also: • revise the double-negative in “much more unclear” → “much less clear” • use backticks to render “TypeError” as monospace
rricard
approved these changes
Jun 2, 2020
Member
rricard
left a comment
There was a problem hiding this comment.
looks better to me, pinging @rickbutton to merge
rickbutton
approved these changes
Jun 2, 2020
Member
rickbutton
left a comment
There was a problem hiding this comment.
thanks for this! TIL setIn exists!
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.
the change makes the Immutable.js example far more readable and illustrates a userland syntax that is comparable to the syntax in this proposal. also, the simplified version actually works (a property path can traverse Maps and Lists), as illustrated here: https://codesandbox.io/s/immutable-js-deep-path-properties-example-xqc9y
also:
state1record in the first example for consistencyTypeErroras monospace