Scoped values: API design

John Rose john.r.rose at oracle.com
Tue Oct 1 21:02:46 UTC 2019


On Oct 1, 2019, at 1:55 PM, Ron Pressler <ron.pressler at oracle.com> wrote:
> 
> 2. Support both a lambda-based and TWR-based scopes.
> 
> I think that the latter feature makes the API too rich, and if we can get a good TWR API,  
> wrapping it with a lambda-based one is trivial, but not the other way around.

I agree that it’s better to start with one or the other of TWR or lambdas.
From an optimization point of view (I know that’s in the future) the lambda
based form will be easier to optimize because its use cases are more
constrained.

A problem with TWR APIs is that they can be used outside of TWR,
and the library has to cope with that somehow, even if it’s just error
detection (which by itself is a hard problem).



More information about the loom-dev mailing list