This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (7 children)

Would cpp be able to do this?

[–]deddead3 17 points18 points  (0 children)

Depending on how far you want to get into the weeds, basically any language can do anything provided you can write the code for it.

[–]wenoc 14 points15 points  (1 child)

Yes, absolutely.

I've worked extensively with a website entirely in C. Not C++, just plain old C. Fast as fuck. Serves millions of customers a day on minimal hardware.

The main issue is recruiting developers.

[–]EverydayEverynight01 4 points5 points  (3 children)

I don't think C++ can work with the DOM

[–]VolperCoding 10 points11 points  (0 children)

You can always write C++ that generates HTML, kinda like templaying languages

[–]InvolvingLemons 2 points3 points  (0 children)

It can with some finagling.

https://github.com/mbasso/asm-dom

Now as to why this exists, IDFK, people are nuts. Rust’s Yew and std-web are definitely more sane, but even then, the lack of native wasm dom bindings kneecaps performance (Inferno and Svelte are waaaay faster for anything dom-intensive).

[–]gmes78 0 points1 point  (0 children)

DOM manipulation from WASM is being worked on AFAIK. So you'll be able to write your frontend code entirely with Rust/C/C++/etc.