Ron Buckton
Ron Buckton
Do you have an example of this behavior in another language you could point to so I could better understand the requirements?
C#/.NET has the concepts of `ThreadLocal` and `AsyncLocal` values, which isolate a value to a thread of execution, or an async call context, respectively. While something like `ThreadLocal` isn't currently...
As I said above, I think `AsyncLocal` would be needed to address this case: https://github.com/legendecas/proposal-async-context#asynclocal. Aside from that or an external coordination primitive, I don't see a way to support...
Quoting my reply to the above comment here for discussion: > UTS#18 affects how `^`, `$`, and `.` match as well. I would argue that `\R` should be consistent with...
Unfortunately, no. `ref` does not bind the method `m` to `o`, it merely acts as if it read the value. For example, the desugaring for this would be: ```js const...
I'd like to revise my position slightly. If a `Reference` is truly a "reified ECMAScript Reference Specification Type", it *could* be construed to mean that executing `m()` should be the...
Its possible we could consider exposing the `this` value as a property of a `Reference`, and if `m` is lexically declared as `ref m`, we could transpile it to `ref_m.value.call(ref_m.this)`,...
`__elemRef` calling `bind` is a non-starter. There would be no reference identity: ```js const obj = { m() {} } const ref a = ref obj.m; // if uses `bind`...
I'm not strictly opposed to the `invoke` option though. One of the design goals for the proposal is that all `ref` declarations will be statically known to be `ref`s, so...
For consistency, all `Reference` objects would need to have an `invoke()`, even if they're not for function values. For non-function values, calling `invoke()` would just throw an error indicating the...