Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 81dbd6c

Browse files
authored
Justify standardization in spite of one-liners
Closes #1.
1 parent 37fe9d4 commit 81dbd6c

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,28 @@ ECMAScript Stage-0 Proposal. J. S. Choi, 2021.
77

88
[HISTORY.md]: https://github.com/js-choi/proposal-function-helpers/blob/main/HISTORY.md
99

10-
There are several higher-order functions that are often used in functional programming.
11-
This proposal would add them to the `Function` global object as static methods.
10+
This proposal would standardize some useful,
11+
common helper functions that get downloaded from NPM a lot.
12+
13+
These convenience functions are simple,
14+
and they can be reimplemented easily in userspace.
15+
So why standardize them? Because:
16+
17+
1. These helper functions are commonly used and universally useful.
18+
Each function is frequently downloaded from NPM,
19+
despite their being easily reimplementable.
20+
This is to be expected:
21+
after all, every JavaScript developer needs to manipulate callbacks,
22+
but they often do not wish to write the utilities themselves.
23+
2. Standardization would improve developer ergonomics.
24+
If we find ourselves needing these functions in a REPL or script,
25+
instead of having to download an external package
26+
or pasting in a definition into our own code,
27+
we can simply destructure the `Function` object.
28+
3. Standardization would improve code clarity.
29+
There would be one standard name for each of these functions,
30+
rather than various names from various libraries
31+
that refer to the same thing.
1232

1333
## Function.flow
1434
The `Function.flow` static method creates a new function from several sub-functions.

0 commit comments

Comments
 (0)