3 ms·
One scenario that might become more common is a C++ front and backend using web assembly at the frontend.
by blackflame7000 8y ago
One scenario that might become more common is a C++ front and backend using web assembly at the frontend.
- corn_dog 8y agothen again it might not.
- mikekchar 8y agoAt the moment I think that's unlikely because as far as I know web assembly can't access the DOM. Once that's fixed, C++ and Rust and a few other platforms will be a lot more viable. I'm not sure how popular it will get, though. For example, GWT gives you a pretty complete Java implementation that compiles to JS (I even use it on a project!). Even as popular as Java is, GWT is not so popular. My experience with GWT has been that it's pretty awkward to use. I can't think of a single thing that's easier to do than in native JS. Personally, I think Typescript is probably a better fit for frontend work for people who want types. Disclaimer: I'm an old school C++ programmer that actually likes writing JS ;-) Where I see web assembly being more compelling is where you want to write native apps and port them to a web or mobile platform. JS applications on the desktop require a pretty massive runtime system and if that's your main goal, JS is not really a great option (IMHO).
- steveklabnik 8y agoIt can access it via JavaScript, meaning it’s slower than it could be.
- blackflame7000 8y agoI'm right with you in terms of being an old school c++ programmer. I'm really fond of the QT framework and they have been doing a lot of work to port their widgets for WebAsm use. This made taking our existing Desktop GUI application and embedding it straight into a webpage super easy. Our backend servers are C++ based and speak JSON via WebSockets so reusing the same objects on the front and backend was also convenient. Also, I would imaging web assembly could open the doors for much more advanced game engines since a lot of them are written in C++.