ScopedValue: Capturing current bindings

Andrew Haley aph-open at littlepinkcloud.com
Sat Jun 3 11:33:54 UTC 2023


On 6/1/23 16:11, Attila Kelemen wrote:

 > David Lloyd quoth:
>> I for one do not*ever*  want any external framework to be able to re-bind context objects that I define without going through APIs that I control, under any circumstances. Encapsulation is a feature not a bug.

> To be honest I don't understand what you are referring to here. I
> would not intend to directly expose the SV to the client of the DI
> framework.

It's a very simple point.

If I allow an external framework to capture and re-use bindings later, then
that external framework *is* able to "re-bind context objects that I define
without going through APIs that I control."

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the loom-dev mailing list