ScopedValue: Capturing current bindings

Pedro Lamarão pedro.lamarao at prodist.com.br
Fri Jun 2 05:58:28 UTC 2023


Em sex., 2 de jun. de 2023 às 01:28, Robert Engels <rengels at ix.netcom.com>
escreveu:

> I think you would really like Rust.
> Java needs to stop trying to address every new paradigm that becomes hot.
>

As I understand it, the demand for "life cycle scoping" is not
particularly met neither by the Java language nor by the Rust language.
I see nothing wrong with the need itself, nor see the Java language as an
impediment to meeting this need, but I do think there is a confusion about
what "scope" means in the name ScopedValue.
The need as expressed is about a kind of "scope" which is transversal to
lexical scopes and thread scopes.
But ScopedValue is expressly a restricted kind of thread local, which is
all about thead scopes.
Naturally, such a thing cannot express cross thread scoping requirements.
As Rosetta Roberts said, languages such as Lisp have special constructs to
express this kind of thing, but Lisp is way too different from Java and
Rust as I understand them.

--
Pedro Lamarão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230602/57b099bd/attachment.htm>


More information about the loom-dev mailing list