Should ScopedValue even allow null?

Adam Gent me at adamgent.com
Thu Jan 30 15:08:28 UTC 2025


I had assumed for an embarrassing amount of time that ScopedValue would not allow null. So much so that I could not understand why its API looked like Optional.

Given that ScopedValue goals are to make things easier it seems that not allowing null might be helpful.

Thoughts?

(Alan had mentioned on reddit that this topic was OK and I assume I'm posting in the right place. If not advance apologies.)


More information about the loom-dev mailing list