Skip to content

Commit 49cb9e9

Browse files
authored
Add "function coloring" to glossary (#155)
1 parent 8fc1995 commit 49cb9e9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

terminology.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,22 @@ While this is not an explicitly adopted goal of TC39, it is a common standards c
510510

511511
[HTML Design Principles](https://www.w3.org/TR/html-design-principles/#priority-of-constituencies)
512512

513+
## Function coloring
514+
515+
### Definition
516+
517+
The observation that it is annoying to have two kinds of functions, with one kind of function easily usable from the other but not conversely.
518+
519+
Originally referred to async and sync functions (it is hard to use an async function from a sync function), though it applies to other possible attributes of functions as well.
520+
521+
### Example
522+
523+
Having `unsafe` functions which are only callable from other `unsafe` functions, while other functions are callable anywhere, would create a new kind of function coloring.
524+
525+
### References
526+
527+
[What Color is Your Function?](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/)
528+
513529
## Contributing to This Document
514530

515531
Here are some tips and ideas for adding a [new definition](#definition-template) to this document.

0 commit comments

Comments
 (0)