r/programming • • Jun 28 '21

JavaScript Is Weird

https://jsisweird.com/
329 Upvotes

173 comments sorted by

View all comments

Show parent comments

7

u/god_is_my_father Jun 28 '21

Yea on the transfer but not the load exec step

No reason we can’t do bytecode in browser safely

23

u/BeefEX Jun 28 '21

That's basically what Webassembly is

2

u/tilk-the-cyborg Jun 29 '21

No it's not. Wasm can't access DOM and as such can't replace JS, it can only supplement it.

1

u/BeefEX Jun 29 '21

Of course, but it's as close as it gets. And I think they are working on allowing access to DOM and stuff like that, but I don't follow it that closely so I am not 100% sure.

-1

u/Somepotato Jun 29 '21 edited Jun 29 '21

No reason we can’t do bytecode in browser safely

bytecode validation is an inherently impossible task; something like webassembly is far more applicable

edit: does this subreddit really only downvote instead of dispute? or do people just downvote when they don't like being wrong or something?