Skip to content

Commit 6606c5d

Browse files
last improvement i promise
1 parent cc8fc24 commit 6606c5d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Only the `catch (error) {}` block represents actual control flow, while no progr
4747
- [Why Not `data` First?](#why-not-data-first)
4848
- [The Need for an `ok` Value](#the-need-for-an-ok-value)
4949
- [A Case for Syntax](#a-case-for-syntax)
50-
- [Why a Proposal?](#why-a-proposal)
50+
- [Why This Belongs in the Language](#why-this-belongs-in-the-language)
5151
- [Help Us Improve This Proposal](#help-us-improve-this-proposal)
5252
- [Inspiration](#inspiration)
5353
- [License](#license)
@@ -553,16 +553,13 @@ Without the `try` operator, the `Result` class is just one of many possible libr
553553
554554
<br />
555555
556-
## Why a Proposal?
556+
## Why This Belongs in the Language
557557
558558
A proposal doesn’t need to introduce a feature that is entirely impossible to achieve otherwise. In fact, most recent proposals primarily reduce the complexity of tasks that are already achievable by providing built-in conveniences.
559559
560-
Optional chaining and nullish coalescing are examples of features that could have remained external libraries (e.g., Lodash's `_.get()` for optional chaining and `_.defaultTo()` for nullish coalescing). However, when implemented natively, their usage scales exponentially and becomes a natural part of developers’ workflows. This arguably improves code quality and productivity.
560+
The absence of a standard `Result` type has led to widespread ecosystem fragmentation. The NPM registry contains hundreds of variations, and countless more exist as private, copy-pasted utilities. This leaves developers with a poor choice: risk adopting a library that may be abandoned, or contribute to the problem by creating yet another bespoke implementation.
561561
562-
By providing such basic conveniences natively, we:
563-
564-
- Increase consistency across codebases (many NPM packages already implement variations of this proposal, each with its own API and lack of standardization).
565-
- Reduce code complexity, making it more readable and less error-prone.
562+
This is the same problem that optional chaining (`?.`) and nullish coalescing (`??`) solved. **They replaced a landscape of competing utilities with a single, trusted language feature**. By standardizing this pattern, we provide a reliable primitive that developers can use with confidence, knowing it is a stable and permanent part of JavaScript. The goal is to end the fragmentation and establish a foundational tool for robust error handling.
566563
567564
<br />
568565

0 commit comments

Comments
 (0)