Scope locals
Andrew Haley
aph at redhat.com
Fri May 7 15:08:30 UTC 2021
On 5/7/21 4:04 PM, Andrew Haley wrote:
> On 5/7/21 3:51 PM, Remi Forax wrote:
>> I wonder if it is necessary to allow to register more than one scope local variable before entering the scope in the API given that using a primitive class (from Valhalla) to group the values should be slightly more efficient that using several scope locals.
>
> It definitely would be, but there may well be separate consumers
> using separately-declared scope locals. It's tempting, though.
Ah, there is another problem with this approach. Let's say you have an
API that produces scope-local bindings. A record wouldn't help if
you needed an opaque set of bindings, which is surely a use case for
this.
--
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