From 49cb9e9a9c919b90c23a979d014b993190daeb0f Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Thu, 10 Oct 2024 06:24:48 -0700 Subject: [PATCH] Add "function coloring" to glossary (#155) --- terminology.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/terminology.md b/terminology.md index 2521336..5e4bf97 100644 --- a/terminology.md +++ b/terminology.md @@ -510,6 +510,22 @@ 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.