4 ms·
I wish the author success in their endeavor, but Rust is pretty far down the stack of languages I'd use to deliver a webserver. I look at Rust for serving web-
by jknoepfler 2y ago
I wish the author success in their endeavor, but Rust is pretty far down the stack of languages I'd use to deliver a webserver.
I look at Rust for serving web-traffic and I see: dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang), weak client library stories (if I'm writing a service layer for a db, etc.), high barrier to entry, thin overlap with the core Rust value proposition (correctness around memory access, performance).
That's not even addressing the "what happens when my entry-level dev has to write something that interops with a web framework written in Rust." My heart can't take those code reviews, I might as well just write that shit myself without a framework for all the pain that's going to cause.
Note: I don't write a ton of Rust, for reasons that are maybe kind of obvious. I reach for it whenever C seems correct, which is rare but not never (for me).
- skeptrune 2y ago> dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang), Rust supports golang style message-passing concurrency if you want it[1]. I'd argue Rust mpsc channels are actually more powerful than Golang's and add richness to message-passing concurrency modeling. [1]: https://doc.rust-lang.org/book/ch16-02-message-passing.html https://doc.rust-lang.org/book/ch16-02-message-passing.html
- kelnos 2y agoYeah, I don't get the hate here. Rust's channels are just as powerful as Go's, and there are even implementations of them in the futures crate that implement the Future trait, so you can await on them and effectively get the same behavior as "blocking" on a channel in a goroutine, without having a bunch of blocking native threads.
- lossolo 2y ago> I'd argue Rust mpsc channels are actually more powerful than Golang's Do they support Go select functionality, buffered channels etc without using 3rd party libraries?
- super_flanker 2y agoWhat's wrong with using 3rd party library? Can golang stop you from using a channel when it's consumed/closed?
- K0nserv 2y ago> dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang) With the exception of having to write out `async`/`await` the dominant concurrency model in Rust is mostly the same as Go(work stealing CSP). Sure Rust's memory model makes it a bit more cumbersome than Go. Rust's Send/Sync bounds might seem complicated, but those concerns are equally relevant in Go, the compiler just doesn't help you.