4 ms·
It may just be for different people, not sure. I'm a Rust fanatic, i use it for everything, including web dev. We even have a shop full of similar Rust folks.
by unshavedyak 3y ago
It may just be for different people, not sure. I'm a Rust fanatic, i use it for everything, including web dev. We even have a shop full of similar Rust folks.
Personally it's my most productive language, and this is after years in Python, NodeJS, and ~5 years Go.
Which isn't to attempt to invalidate your experience. But i do think:
> writing Rust is a slog where you have to jump through hoops and spend a lot more time thinking about programming language abstractions than thinking about the problem you're solving.
Is quite a leap. A language you describe not speaking natively is, unsurprisingly, difficult for you. Which is a far cry to say it's always that way.
You of course shouldn't be in a rush to rewrite anything unless you see the value in it. I make no claims of that value, either. Rewrite It In Rust (RIIR) is a meme, imo a destructive meme. But i do take issue with labeling any language broadly.
Most languages are pretty good when you're very fluent in them, and while they do have tradeoffs, i don't think Rust's tradeoffs are as you put them.
- jahewson 3y agoRust for web dev instead of Go? I want to believe. What’s the killer app?
- unshavedyak 3y ago> Rust for web dev instead of Go? I want to believe. What’s the killer app? No killer app here. We just prefer Rust itself. Go is very capable and a great choice. For me personally i found Go to spread logic out far too much. Some features of Rust, Iterators for example, massively simplified how i think about data flow. That was my #1 issue with Go. This has side root-causes in Go of course, like no generics to allow for Iterators, etc - but these days Go has generics so it's likely improving. Features around Enums are also huge for me. I left Go ages ago and it's improved a lot sense then. I still prefer Rust, though. As i said no judgement on any lang, including Go. This is merely my experience and preferences.
- tracker1 3y agoI would say for me, the killer app would be just about anything you might reach for Electron with, but want a much smaller install footprint. Tauri in and of itself is pretty cool, kind of a lighter alternative to electron using native platform browser engine. In general, I would probably reach for Rust if I needed to do anything wither Web-Assembly (wasm) as the path to working is much nicer than other languages imo. Along those lines, Yew is pretty nice as a rust-like framework. I've also played with Rocket, and found it very nice and effective for api driven web-apps. Haven't done any templating engines in/with Rocket, however.
- rizky05 3y ago[dead]
- yodelshady 3y agoTauri might be cool in theory, but Hello World consumers TWO POINT EIGHT GIGABYTES of hard disk on my machine. Arguing "Rust has no dev speed penalty" in that context is just... no. You are damaging your own cause there, because all advocacy becomes laughable.
- tracker1 3y agoSo, you built the application, created the installer... and your install on another machine is 2.8GB? I find that hard to believe. From another response, their Windows installer is under 7mb, and much of that is MSI boilerplate. https://github.com/lencx/ChatGPT/releases/tag/v1.1.0 https://github.com/lencx/ChatGPT/releases/tag/v1.1.0
- CryZe 3y ago> but Hello World consumers TWO POINT EIGHT GIGABYTES of hard disk on my machine. While yes, that's really bad, it's just temporary build files. The actual executable should be fairly tiny.
- lencx 3y agoTauri is indeed very cool, and also very small (the installation package is typically under 5MB). I used it to build a wrapper application for the ChatGPT official website, extending the site with many interesting features through script injection. However, the compatibility of the system webview across different platforms is a frustrating matter. https://github.com/lencx/ChatGPT https://github.com/lencx/ChatGPT
- boredumb 3y agoI use Tide with great success
- swlkr 3y agoDioxus liveview or if you don't want websockets, dioxus fullstack, you can use warp or salvo but axum is good. Rust embed is also great, I cross compile everything into a single dynamically linked binary and scp to my vps, deployment is a breeze.
- eyegor 3y agoYew is pretty well loved, but I haven't had a chance to do much beyond toy projects with it. https://yew.rs/ https://yew.rs/ https://github.com/yewstack/yew https://github.com/yewstack/yew
- nextaccountic 3y agoOn the backend it's probably axum and tokio https://github.com/tokio-rs/axum https://github.com/tokio-rs/axum https://tokio.rs/tokio/tutorial https://tokio.rs/tokio/tutorial
- adamnemecek 3y agoThere are front end Rust frameworks that work via wasm.
- tracker1 3y agoI'd like to make the jump to FT Rust myself, just don't have enough hands on... and as I get older, motivation to work on more stuff on the side, as well as time, becomes more limited.
- orangetuba 3y agoSo if you take a Python program and you add the mental effort of having to deal with static types, lifetimes, the borrow checker and performance considerations, and this added mental effort actually allows you to write the program faster? That is incredible. It's like being able to carve- and install a door from a slab of wood faster than installing a prefabricated door.
- remexre 3y agoHaving types lets you get better editor completion and such; I'd say Rust pushes you into bottom-up design, which I find significantly more productive than top-down too; doing bottom-up design is much trickier in a dynamic language, though, because changes to one of your "bottom layers" break upper layers in a way that the compiler/interpreter can't see
- theLiminator 3y agoDepends, maybe time to first run is lower in python, but time to a robust/quality solution could be a very different story.
- mkehrt 3y agoThis line of reasoning is utterly alien to me. If your types add mental overhead, you’re doing something wrong. You should be able to rely on the typechecker to check invariants for you, decreasing mental overhead. You have to think about types anyway, especially in an untyped language, where you can’t rely on the typechecker.
- infamouscow 3y agoThe leap from thinking about your program with inheritance to thinking about your program with traits is large and cannot be overstated. It's one of the reasons why Python developers don't like working in Ruby, for example.
- jaredklewis 3y agoI code faster in types languages. I find typed code easier to read and understand. A lot of writing new code is just reading and understanding existing code. So the claim doesn’t sound so crazy to me. For me at least, types remove mental overhead, they don’t add to it. I can’t count the times I’ve been reading through untyped (or inaccurately typed) python code and have had to jump a dozen levels deep just trying to figure out if a function can or cannot return null.
- deleted 3y ago[deleted]