-
Notifications
You must be signed in to change notification settings - Fork 695
Text format: named expressions instead of push/pop? #693
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
That document is an experiment. Please file issues pertaning to it on the repo which contains it, rather than the WebAssembly repo. |
@sunfishcode It's not immediately obvious how to file an issue in that repo? Might this need to be enabled. @qwertie Would your proposal be a pre-processor layer that expands the named expression into its use point, so that the named expression might be evaluated multiple times and would be evaluated where it is used? Or would it be similar to my proposed extension in #685 where an expression result can be named and the result reused which would be the same as using a value up the value stack? If an expression result is used multiple times then this would need an extension to wasm, except in some restricted cases. |
@sunfishcode I assumed that since issues were disabled in your copy of the repo, that discussion should take place here. It made sense to me. @JSStats the former. |
@qwertie It was not, and is still not, clear to me that |
I didn't realize the issue tracker was not enabled. It is now. Please do keep in mind that this is an experiment. |
@sunfishcode It's a personal strawman experiment right up until it gets implemented in a browser. After that it's something more. I actually think it's fine to have an experimental text format (and other experimental stuff) in a browser too, but at that point I think it's also fair to say you can no longer avoid public discussion (including bikeshedding). :) Having said that I like the format quite a bit. I agree with you that we don't want re-usable subtrees and, more generally, that the text format should explicitly mirror the wasm semantics and binary encoding. In other words no macro layers, and no reusable subtrees unless we get them in the semantics. There's only one tree, and |
@sunfishcode Sorry I raced with you. https://bugzilla.mozilla.org/show_bug.cgi?id=1274618 says that you're looking to get feedback from users. What forum would that feedback be in? I'm sympathetic to the idea that since this is an experiment we don't need to be having discussion here, but since Mozilla is implementing it I'd like there to be a bit more visibility than just discussion on your github. On the other hand, now that we've had all this noise, maybe that's sufficient if someone opens another discussion on some Moz forum or wherever and links to it here? |
@dschuff I'd like to get our initial implementation up and running before we get too far into this, because I believe that with WebAssembly's unique nature, experiments in context on real code will inform the discussion better than just design docs and a few small examples. In the meantime, any questions, concerns, suggestions, opinions, etc. are welcome on my repo's issue tracker. |
Reviewing this proposal I would propose, instead of a strict push-pop regime, a simple way of naming trees. That is, instead of
let's use
This is potentially better when writing code by hand because you can give a name to each subtree, and you can use a tree more than once:
The text was updated successfully, but these errors were encountered: