Skip to content

Make Immutable.js comparison example more idiomatic and readable#14

Merged
rickbutton merged 2 commits intotc39:masterfrom
acusti:patch-1
Jun 2, 2020
Merged

Make Immutable.js comparison example more idiomatic and readable#14
rickbutton merged 2 commits intotc39:masterfrom
acusti:patch-1

Conversation

@acusti
Copy link
Contributor

@acusti acusti commented Jun 1, 2020

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:

  • fixed typos (“succient” → “succinct”, “propertiess” → “properties”)
  • added a trailing comma to the state1 record in the first example for consistency
  • revise the double-negative in “much more unclear” → “much less clear”
  • use backticks to render TypeError as monospace

acusti added 2 commits June 1, 2020 11:20
• 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
Copy link
Member

@rricard rricard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks better to me, pinging @rickbutton to merge

Copy link
Member

@rickbutton rickbutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this! TIL setIn exists!

@rickbutton rickbutton merged commit 2c28f9c into tc39:master Jun 2, 2020
@acusti acusti deleted the patch-1 branch June 2, 2020 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants