From ffd7b66df5d759f3aa9e0f52130d2f27da628d44 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Tue, 8 Oct 2024 08:42:00 -0700 Subject: [PATCH 1/2] Add "function coloring" to glossary --- terminology.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/terminology.md b/terminology.md index 2521336..5a6fac3 100644 --- a/terminology.md +++ b/terminology.md @@ -510,6 +510,21 @@ While this is not an explicitly adopted goal of TC39, it is a common standards c [HTML Design Principles](https://www.w3.org/TR/html-design-principles/#priority-of-constituencies) +## Function coloring + +### Definition +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. + +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. + +### Example + +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. + +### References + +[What Color is Your Function?](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/) + ## Contributing to This Document Here are some tips and ideas for adding a [new definition](#definition-template) to this document. From 98a1a5c38f35700c6096402e005f7ed9f2b29812 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Tue, 8 Oct 2024 19:46:57 -0700 Subject: [PATCH 2/2] Update terminology.md Co-authored-by: Jordan Harband --- terminology.md | 1 + 1 file changed, 1 insertion(+) diff --git a/terminology.md b/terminology.md index 5a6fac3..5e4bf97 100644 --- a/terminology.md +++ b/terminology.md @@ -513,6 +513,7 @@ While this is not an explicitly adopted goal of TC39, it is a common standards c ## Function coloring ### Definition + 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. 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.