• 0 Posts
  • 43 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle

  • Most games, image processing libraries and other compute demanding libraries already use WASM in the browser. Have been for quite some time. It’s already widely used in every case where it provides a substantial benefit.

    But writing for GUI, which is what 99% of JS is used for, WASM provides little benefit. The speed bottleneck is mostly in DOM manipulation. And every web GUI framework uses 200 npm packages with something like webpack. Getting that to somehow work with your WASM code would be a nightmare if it’s even feasible.
















  • Being easy to understand is one of the primary goals of any programming languages.

    The problem with Javascript is that it isn’t easy to understand. Javascript is easy to write.

    That’s why it’s easy for novices to pick up and why it ends up being spaghetti code. It’s very unrestrictive and allows writing very poor code that works based on assumptions and breaks when the assumptions aren’t met.

    It made sense at the time because it was just a scripting language for some minor website things, and you didn’t want your site to crash if your script ran into a problem.

    Now it’s being used to write full fledged applications and it’s past design choices are still haunting it.