3 ms·
I don't think that Rust is good for a typical web app (for example, a newsfeed with likeable images or an online store). Rust is very low-level language and doe
by codedokode 4y ago
I don't think that Rust is good for a typical web app (for example, a newsfeed with likeable images or an online store). Rust is very low-level language and doesn't have a garbage collector, so development with it will be slower than using JS.
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?
- lumost 4y ago> It is good if you need to do maths or process videos, but doesn't give much advantage in processing JSON trees. 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.
- hedora 4y agoRust's serde library is great for processing JSON. It automatically serializes/deserializes objects to json, and you can write arbitrary validation methods. It's also extremely fast. 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.
- felipellrocha 4y agoSo many misconceptions to comment here, I’ll focus on a one: > 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.
- brundolf 4y agoMost of these read as coarse/superficial takes that aren’t really informed by the nuances of the real world
- npigrounet 4y ago