this post was submitted on 07 Aug 2023
72 points (97.4% liked)
Programming
17313 readers
241 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not directly no. But it can via JS (without the developer needing to ever touch JS code themselves via auto generated bindings). And this is simply a limitation of the current WASM implementations/standards. I believe there is work on going to get WASM more direct access to the DOM. But really this will just be an efficiency improvement over what is currently possible (which is already possibly to be as fast as pure JS frameworks).
This is not quite true. Yes we cannot replace JS currently. But you don't need to learn JS to develop using WASM - there is already enough tooling that can auto generate any JS code needed for you so developers never actually need to learn or touch JS if they don't want to.
But existing developers that already know JS don't have a huge reason to learn another language that only have a vastly less mature ecosystem. So the door is currently open for those that don't enjoy or want to touch JS, but those people will at this point in time be working on other things rather then web apps. So there is not going to be a huge push for moving to a different language with WASM support any time soon. Not to mention that there is only minor benefits to existing applications that make a full rewrite to another language not worth the effort. So people wont be flocking over toward it, but not for the reasons you mentioned.
Sure, you can autogenerated js bindings, but as soon as you need to start debugging or optimizing you need to understand the js that was generated for you.
I don't think so. Having played around with wasm-bindgen in rust as well as other libraries the build on top of it I have never once needed to look at or understand the generated JS code. When you need to debug or optimise things the first thing to look at is the rust code. So as it stands today I do not think you need to know JS to write code for a web frontend - at least in isolation of anything else (ie teams, existing products etc).
You will likely need to learn JS at some point when writing stuff for the web - as the JS ecosystem is so vast for web development when compared to anything else. But WASMs JS bindings are not the point you will need to know it for.