Earlier quoted context omitted.
I'm the other way around I guess - a lot of anxiety when I'm forced to touch fragile bits written in Ruby, Python and JS at work. Part of it might be the terrible tooling story in each of those language ecosystems as well. Last week I deployed a Ruby change where a missed comma between two strings in an array did not get picked up by any of the automated tooling or by 3 other team members who code reviewed my change,…
> Rust is the only language where I can open something like Notepad without an LSP or highlighting, write code for an hour without testing or compiling, and then run clippy a few times to see and make the suggested fixes. > anxiety when I'm forced to touch fragile bits written in Ruby Wild, because the first sentiment is exactly how I feel about Ruby.
Rust needs a web framework
151–160 of 395 posts
Re: Rust needs a web framework
#152Earlier quoted context omitted.
People who say copilot is useless.... I can only imagine they're in a dynamically typed language. Copilot + Rust makes boilerplate go fast. Strong typing is force multiplier for code gen.
I suspect that’s true. I never blindingly copy LLM generated code (that would be recklessly stupid), but I often only quick skim rust code generated this way, just to make sure the general task it is solving is what I asked for. If there is an unhandled edge case or or memory handling bug, rust will catch it.
Re: Rust needs a web framework
#153Earlier quoted context omitted.
> When did threading get added to JavaScript? Shared mutable state is a problem even in single threaded code (for example, modifying a collection you're iterating over) > And does Rust have type unions and intersections, interfaces, and mapped and conditional types? You can typically accomplish the same thing with enums/proc macros/traits of course—with the additional benefit that the type system is designed to be so…
> Shared mutable state is a problem even in single threaded code (for example, modifying a collection you're iterating over) ...which is an extremely rare source of bugs. The vast majority of errors caused by shared mutable state are related to concurrency. > usually So, not always. That is - TypeScript's type system contains features that Rust's does not have.
If you ever put an await anywhere in your code, an arbitrary amount of random stuff might run between the time you await and the time the awaiting finishes.
Same applies to older mechanisms like callbacks and promises.
Race conditions are more rare there because as long as you aren't doing any IO, there is indeed no concurrency, so you can't e.g. get two threads trying to increment a single variable at the same time. They can still happen, though, especially if you accidentally do a partial change to an object, put it in an illegal state, and do IO before you finish that change.
Re: Rust needs a web framework
#154Earlier quoted context omitted.
IDK I use C/C++ all the time for web servers. It's lightweight and lets you pretty easily/quickly call C/C++ and low-level code and gives you a lot of control in terms of networking. You can pretty much "do anything" in a straightforward generic way without having to learn some application specific language like PHP or through nginx/apache configuration files. Having a rust alternative to something like libmicrohttpd…
> You can pretty much "do anything" in a straightforward generic way without having to learn some application specific language like PHP or through nginx/apache configuration files Not having to learn something like PHP? Do we not count learning C++? I would guess most people would agree learning PHP + Nginx is going to be a lot less complicated, which will be preferable for people just trying to build something. I'm…
No, because they presumably already know it. They wouldn't be using it otherwise.
Re: Rust needs a web framework
#155Earlier quoted context omitted.
I'm a lazy developer and I love languages with an "if it compiles it works" feel. I'd much rather hack around in rust or typescript with half my brain switched off and a beer in hand and eventually get working software than hack around in javascript with half my brain switched off and a beer in hand and get more and more broken software until I eventually give up.
Then just use Ocaml or F#. You are welcome.
Re: Rust needs a web framework
#156Earlier quoted context omitted.
I am a fan of Rust for systems programming, but so many people are using Rust for things that are nothing even remotely close to systems programming. So many projects you see being written (or rewritten) in Rust are projects where I just think 'wait, why can't this just have a GC'? And then you look at the code base, and it's all Arc >s, and you can't help at marvel at this, since that's just GC, so what's the benefi…
I'm just really leery of using languages that don't have a clear separation between immutable and mutable state. Having it in Rust catches so many bugs. I also want to write code in languages where you don't have to engage in bad software engineering practices to get optimal performance. That usually means aggressive inlining, something that Rust excels at. edit: the other thing I wanted to mention is that rust's fea…
I say this as a Rust enjoyer, but I take the pain because I _really_ want what I'm working on to be fast.
Re: Rust needs a web framework
#157Earlier quoted context omitted.
The author is clearly building things for the joy of it. If she gets the most joy from Rust, that's what she should use! > See, if I want to make something for the web, I could use Django but I don't want that. I mean, Django is for building serious businesses, not for building silly non-commercial things! Personally, I spent the first decade of my career switching between languages, believing that I should use the b…
> If she gets the most joy from Rust, that's what she should use! In the past I’d try to justify why I’d done something a certain way when another way would’ve been faster / better / cheaper, but I now realise that (at least for personal pursuits) an acceptable answer to “why?” is simply “because I wanted to”.
If I were putting together a web development team, would I recommend Rust? ...probably not. But that's because I'm putting together a team, not a playground. I'm paying people. I want to use common, well-supported, time-tested methods, unless steering away from that is truly needed to make the project successful. For web dev, that assuredly ain't Rust ("yet," some may add).
But for me? Just for me? I think it's a language I'll always enjoy. Within that line of thinking, I do feel there's room for better web dev tooling in Rust, though what's already there is probably enough to at least get started.
Re: Rust needs a web framework
#158Earlier quoted context omitted.
I'm just really leery of using languages that don't have a clear separation between immutable and mutable state. Having it in Rust catches so many bugs. I also want to write code in languages where you don't have to engage in bad software engineering practices to get optimal performance. That usually means aggressive inlining, something that Rust excels at. edit: the other thing I wanted to mention is that rust's fea…
I think this is a legit sort of reasoning, but in an interesting way it's something where OCaml could fill the gap. It has its ergonomics issues, but I think the issues are basically the same/worse in Rust (except I guess Rust's macro system is better). I say this as a Rust enjoyer, but I take the pain because I _really_ want what I'm working on to be fast.
I use Rust often for things that aren't possible in other languages, so I also use it for things that are possible in other languages. (Though I used Python for a production and an art project recently -- with uv it's quite nice.)
Re: Rust needs a web framework
#159Earlier quoted context omitted.
> Worrying about lifetimes Again, not my experience at all. I simply don't think about any of that stuff when I write Rust, all my mental energy can safely go towards working on whatever I'm building. If you don't believe me, you're welcome to watch the literally hundreds of hours of me live coding in Rust on YouTube.
> Again, not my experience at all. I simply don't think about any of that stuff when I write Rust Your subjective perception is not reality. You have to think about it, or your programs will be incorrect. The mental load may be low to an experience Rust programmer, but it is there, and it's very intrusive to Rust beginners like myself. > If you don't believe me, you're welcome to watch the literally hundreds of hours…
Re: Rust needs a web framework
#160Isn’t there a rust rails clone? Yeah, it’s called loco https://loco.rs/ FWIW I prefer the pile of libraries. Big frameworks are good for scrappy startups trying to push their product out asap, but in most of situations, I’d like a lower abstraction system to build on.
This needs to be higher up. Loco seems to be exactly what OP is looking for, yet it wasn’t mentioned in the article.