3 ms·
Is anyone able to lay out some of the reasons why you might want to write web applications in rust? I was under the impression rust was designed as a safer lang
by matt2000 8y ago
Is anyone able to lay out some of the reasons why you might want to write web applications in rust? I was under the impression rust was designed as a safer language for low level systems programming. Thanks!
- staticassertion 8y agoIt's fast. It's type safe. Solid developer tooling story. Those three things are very appealing, whether it's web or anything else.
- steveklabnik 8y agohttps://news.ycombinator.com/item?id=18621820 https://news.ycombinator.com/item?id=18621820
- haiihaii 8y agoWeb servers for embedded or otherwise constrained systems, bolt-on embedded api servers for your existing apps, or just any high perf app/gateway. All the reasons you would otherwise do it in cpp except nope.
- AsyncAwait 8y agoI'd say that in all the talk of Rust being a C replacement, what gets lost is that it is also a very expressive, modern, functionally flavored language, perfectly suitable for higher-level programming. If you want type safety, speed, expressive language & native binaries, Rust is a good choice.
- IshKebab 8y agoSure, however you do pay the significant cost of having to satisfy the borrow checker. There are other nice expressive languages where you don't have to do that so if you actually don't need the speed Rust is maybe not the best choice.
- AsyncAwait 8y ago> you do pay the significant cost of having to satisfy the borrow checker Right, but this is presumably a one-time investment while learning Rust, much less of an ongoing hurdle.
- IshKebab 8y agoI disagree. It's something you always have to think about. It might get easier but it doesn't magically go away.
- AsyncAwait 8y agoYou often should think about it in other languages too, ie to avoid concurrency bugs. If you don't, there's a good chance your program isn't correct, even if accepted by a less strict compiler.
- IshKebab 8y agoYes. But the point is that you don't have to "dumb down" your program to prove to a static analyser that it is correct. Look at the kind of programs that NLL now allows. You wouldn't have to jump through those hoops in another language.
- mmirate 8y agoSatisfying the borrow-checker usually ends up implying that either: a) you used .clone() everywhere and therefore are probably modifying something and failing to propagate the modifications to where they need to go; or b) your design is inherently better, saner, easier-to-optimize, etc., than one which doesn't have to satisfy the borrow checker.
- JTenerife 8y agoVery efficient usage of CPU and RAM. Regarding cloud functions like AWS lambda: Fast startup.