they’re a service locator with the very specific and singular scoping ability of scoping something to a composable sub-hierarchy. With the additional caveat that the API also gives you the tools to change the value over time, and have the usage sites will recompose as a result.
I think service locator is a reasonable way to think about it, but i think it’s useful to not overlook the differences, some of which were the primary motivations of the API.
If Dagger/Hilt does the thing you need, then you should probably use that instead of Ambients.