@@ -7,8 +7,28 @@ ECMAScript Stage-0 Proposal. J. S. Choi, 2021.
7
7
8
8
[ HISTORY.md ] : https://github.com/js-choi/proposal-function-helpers/blob/main/HISTORY.md
9
9
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.
12
32
13
33
## Function.flow
14
34
The ` Function.flow ` static method creates a new function from several sub-functions.
0 commit comments