by codedokode · 4y ago · 0 comments
It is good if you need to do maths or process videos, but doesn't give much advantage in processing JSON trees.
Also, I don't think it is necessary to make a SPA for a simple web store. Looks like overengineering to me. If you don't like that pages are reloading then use any library that automagically replaces the page content on link click. You can turn any "classic" server-side rendered site into something that feels like a SPA but without writing any JS code.
Regarding languages that are best for developers' performance, I guess it is Python? Are there languages that allow to solve typical web tasks using less tokens?
> Rust is very low-level language and doesn't have a garbage collector, so development with it will be slower than using JS.
Rust doesn’t have to be low level, and you rarely have to manage memory manually despite the lack of a garbage collector. That is actually one of the coolest features Rust provides: the borrow checker.
I’ve often found my development with it is orders of magnitudes faster than when I develop with javascript because of all the cool features Rust provides.
Since rust has a rich type system and generics, it is able to automatically generate all sorts of useful things at compile time. JSON boilerplate is only one example.
Also, the html! macro in the article allows for some nice syntactic sugar, presumably without giving up compile time type checking.
The SPA part feels like overkill, but they're demoing an SPA framework. There are many other rust web service frameworks.
This seems like a great reason to use Rust in the browser, or any other high performance statically typed language. We'd still expect substantial overhead from WASM for a while, but the idea that I can/could natively compile OpenCV to wasm and directly invoke it on the browser seems like a huge win.