<div dir="ltr"><div dir="ltr">Em qui., 30 de jan. de 2025 às 13:21, Adam Gent <<a href="mailto:me@adamgent.com">me@adamgent.com</a>> escreveu:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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.<br>
<br>
Given that ScopedValue goals are to make things easier it seems that not allowing null might be helpful.<br>
<br>
Thoughts?<br>
<br>
(Alan had mentioned on reddit that this topic was OK and I assume I'm posting in the right place. If not advance apologies.)<br>
</blockquote></div><div><br clear="all"></div><div>Hi Adam!</div><div>One of the "classic" examples for ScopedValues is communicating the Principal associated with a session in some framework.</div><div>Should we require that frameworks must, for anonymous sessions, set the Principal to some NoPrincipal object instead of null?</div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>