3 ms·
> in which we have already had most of this conversation. Interestingly enough, nowhere do you even mention these conversations in your attempts to push binar
by dmitriid 9y ago
> in which we have already had most of this conversation.
Interestingly enough, nowhere do you even mention these conversations in your attempts to push binary AST as hard as possible.
> Consequently, should such a compilation take place, I suspect that this would considerably increase the size of the file and the parsing duration;
Emphasis above is mine. However, it's presented (or was presented) by you as a fact.
> What I claimed is that if we ended up with one-bytecode-per-browser or worse, one-bytecode-per-browser-version, the web would be much worse than it is. I stand by that claim.
We are ending up with one wasm bytecode for every browser, aren't we?
> as far as I know, browser vendors are not working together on standardizing a bytecode for the JavaScript language;
Because they are working together on standardizing bytecode for the web in general, aren't they?
> coming up with a bytecode for a language that keeps changing is really hard
So you're trying to come up with a binary AST for a language that keeps changing :-\
> keeping the language-as-bytecode and the language-as-interpreted in sync is really hard
What's the point of WebAssembly then?
> I do not think that anybody will start working on standardizing a bytecode for the JavaScript language.
Because that's not really required, is it? This is a non-goal, and never was the goal. The goal is to create an interoperable standardized bytecode (akin to JVM's bytecode or .Net's MSIL), not a "standardized bytecode for Javascript". For some reason you don't even want to mention this.
> I claimed that no browser vendor seriously contemplates exposing their internal bytecode format
They don't need to.
> Additionally, the JavaScript Binary AST is designed in such a manner that evolutions of the JavaScript language should not break existing parsers.
I shudder to think how rapidly changing languages like Scala, ClojureScript etc. can ever survive on the JVM. The horror!
> If/when that day arrives, I'll compare both approaches.
Basically you will end up with two representations of JS: a binary AST and a version that compiles to WASM. Oh joy. Wasn't this something you wanted to avoid?
- orf 9y agoRegardless of all your points, the fact is that WASM isn't ready for this now, and doesn't appear that it will be for some time. Combined with the fact, as mentioned above, that DOM access is significantly slower means that WASM isn't a suitable candidate. This is something you forgot to mention or take into account in your comment, for some reason. Yes this does seem to overlap a bit with wasm as you have noted, but saying "well we could get this optimization but we need to wait several years until this highy complex other spec is completely finished" doesn't seem as good. Why not do this, and use wasm when it's available? Why can't you have both?
- dmitriid 9y ago> Regardless of all your points, the fact is that WASM isn't ready for this now As opposed to Binary AST which as available now? :) > Combined with the fact, as mentioned above, that DOM access is significantly slower Given that DOM access for WASM currently happens via weird interop through JavaScript (if I'm not mistaken) how is this a fact? > "well we could get this optimization but we need to wait several years until this highy complex other spec is completely finished" doesn't seem as good. No. My point is: "Let's for once make a thing that is properly implemented, and not do a right here right now short-sighted short-range solution" That's basically how TC39 committee operates these days: if something is too difficult to spec/design properly, all work is stopped and half-baked solutions are thrown in "because we need something right now". > Why not do this, and use wasm when it's available? Why can't you have both? Because this means: - spreading the resources too thin. There is a limited amount of people who can do this work - doing much of the work twice - JS VM implementors will have to support text-based parsing (for older browsers), new binary AST and WASM
- orf 9y ago> how is this a fact? ... because DOM access is significantly (10x) slower? That alone rules out your approach right now, regardless of the other points raised. > Because this means: ... When you understand how weak these arguments are you will understand the negative reaction to your comments on this issue. You're clearly very passionate about this issue but you don't seem to be assessing the trade offs. Having something right now and iterating on it is better than waiting an indeterminate amount of time for a possible future solution involving an overlapping but otherwise unrelated specification that has not been fully implemented by anyone to a satisfactory point, and one with very complex technical issues blocking its suitability. Sure, it would be nice to use WASM for this, but it is in no way needed at all. Given the status of WASM and the technical issues present with using it in this way it is odd to champion it to such a degree. It seems your entire arguments boil down to "WASM may be OK to use at some point in the future, stop working on this and wait!". I, and I'm assuming others, don't see this as a very convincing point. If I may, I'd offer some advice: stop taking this issue to heart. Time will tell if you're right, and making borderline insulting comments to the technical lead of the project in an attempt to push your position doesn't help anyone. The world is heating up and species are dying, there are much better causes to take to heart.