New candidate JEP: 429: Extent-Local Variables (Incubator)
Andrew Haley
aph-open at littlepinkcloud.com
Wed Aug 31 08:45:15 UTC 2022
On 8/28/22 17:24, Zheka Kozlov wrote:
> Just out of curiosity: why was a static where() method chosen? An instance
> method seems more natural:
>
> PRINCIPAL.where(principal).run(...)
> vs.
> ExtentLocal.where(PRINCIPAL, principal).run()
It doesn't chain so nicely.
Consider
PRINCIPAL.where(principal).also(PRINCIPAL2.where(principal2)).run(...)
or
PRINCIPAL.where(principal).also(PRINCIPAL2,principal2).run(...)
or something.
> Also, a couple of notes regarding Javadoc:
>
> 1. Two methods runWithBinding() and callWithBinding() are mentioned in
> the description. But ExtentLocal doesn't have such methods. It only has
> three overloads of where().
> 2. The code example doesn't use a code snippet. It uses the old HTML
> formatting.
Where is 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