3 ms·
It says not to, but the reason is because you will probably not handle context semantics correctly, not because it inherently breaks anything. If the object yo
by morelisp 6y ago
It says not to, but the reason is because you will probably not handle context semantics correctly, not because it inherently breaks anything.
If the object you embed the context in has all the properties of a context (short-lived, request-scoped, passed to every function that needs to handle it, and provides a way to create a nested context) then embedding the context is at worst unidiomatic. This is how http.Request did it to preserve backwards-compatibility; http.Handler usage was too pervasive to ever change its signature.