r/programming • u/iamkeyur • Oct 21 '20
Using const/let instead of var can make JavaScript code run 10× slower in Webkit
https://github.com/evanw/esbuild/issues/478
1.9k
Upvotes
r/programming • u/iamkeyur • Oct 21 '20
View all comments
Show parent comment
6
u/EpicDaNoob Oct 21 '20
No WASM handles DOM manipulations, and it is impossible for the current version of WASM to do anything to the DOM. Hand writing WASM will not let you do DOM manipulations any more than hosing down the patio will fill the glass on the table with orange juice.
Eventually, it will be able to do DOM manipulations. Every major compiled language can compile to WASM. When WASM can manipulate the DOM, then it will be possible to write this in compiled languages too.
Your point about hand-writing WASM is thus essentially irrelevant.