Skip to content

Commit

Permalink
Merge pull request #1059 from foundrytom/work/dr19
Browse files Browse the repository at this point in the history
[Docs] Improve language in Context access DR
  • Loading branch information
foundrytom committed Aug 30, 2023
2 parents 7f10630 + d0b780d commit a592005
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doc/decisions/DR019-Remove-access-from-the-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ data = manager.resolve(..., write_context)

In practical use, this approach has proven to be hard to understand and
easy to get wrong. We frequently find ourselves writing "don't forget to
consider the context" in method documentation. As we well know, no one
reads documentation.
consider the context" in method documentation. An API of any quality
should be intuitive to use wherever possible, and avoid reliance on
detailed examination of the docs.

The result is that a core API mechanism is largely misunderstood, and
easily overlooked.
Expand Down Expand Up @@ -168,9 +169,9 @@ data = manager.resolve(kWrite, ..., context)
- The necessity (and ambiguity) of `createChildContext` is removed from
the majority of host call sites. This also reduces runtime overhead
significantly.
- RTFM becomes less critical as the access concept is surfaced directly
in the API signature. Documentation can also be more directly
specific.
- Detailed memorization of the docs becomes less critical as the access
concept is surfaced directly in the API signature. The documentation
itself can also be more specific.
- High-churn `access` mutations are decoupled from the relatively stable
and coherent lifetimes of the other `Context` properties.
- Removes some debate around attempting to make Context use value
Expand Down

0 comments on commit a592005

Please sign in to comment.