-
Notifications
You must be signed in to change notification settings - Fork 35
Nit: What should we use the term "live binding" for? #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think that a mutable Object is a better term, whereas live binding would implit a direct memory access? The WebAssembly spec doesn't mention "live binding", we should avoid introducing it here. |
But specifying |
Well, for |
yeah, I agree, but that does not include everything right? |
OK, sounds like we should avoid calling exported functions mutable objects. Anything else? |
I think yes. since |
This thing is that from a JS perceptive (unless it's readonly) a WebAssembly func (HostFunc) is a mutable object, right? You can perform mutation; add props etc. I think we should just avoid the term "live binding" and call the communication surface: API. Otherwise it seems to me that |
Yes, it's true, and the Wasm/JS API guarantees that the host functions are shared when being re-exported multiple times. |
@xtuc does it means that I can override the |
Yeah, they are shared. Are they mutable? |
Yes, they are ordinary mutable JS objects. |
- Initialize Wasm exports in TDZ; closes WebAssembly#18 - Document motivation for no circular modules and circular imports of functions as a follow-on; closes WebAssembly#17 - Avoid use of the term "live binding"; closes WebAssembly#19 - Permit imports of Numbers as constant globals; closes WebAssembly#16
I originally thought "live binding" referred to a mutable variable storage, which could be exported, and then overwriting the variable on one end would affect the live binding on the other end.
The README in this repository, and under #13, seems to use "live binding" to mean something else: when wasm exports something (e.g., a Global, Memory, or Table) which is somehow mutable, then the binding is "live" in the sense that, when that object is mutated, it's reflected in the exported version. This usage was initially surprising to me; I would've thought of this as a kind of snapshot (just a shallow one, of a mutable object)
I'd suggest that, in this proposal, we either clarify that we're using this broader sense of "live binding" (could be just a couple sentences), or avoid the term.
The text was updated successfully, but these errors were encountered: