6 ms·
I don't agree. I think the author is conflating two things: 1. learning Rust, and 2. using Rust. If you take away "Rust made us slow because our team had to l
by dcow 4y ago
I don't agree. I think the author is conflating two things:
1. learning Rust, and
2. using Rust.
If you take away "Rust made us slow because our team had to learn how to use it and thus we had slow iterations and it's harder to find hires with Rust knowledge" from the equation, then you aren't left with much argument against using Rust early.
The iteration time issue with Rust is solved by experience. We use Rust and our iteration times are average. What we gain is not performance, that's not a reason we use Rust (for an early stage startup, totally agree you burn credits until you can afford to care). We gain correctness. And at an early stage, correctness without paying for a massive QA team is a huge boon.
There are definitely more mature tools for quickly standing up CRUD APIs. If you want a framework that can bootstrap you into an OpenAPI with docgen, swagger, all the bells and whistles, Rust doesn't do that. But Rust will help force you to write correct code that never crashes and handles edge cases it's easy to forget about when moving fast in a duck typed language.
The only language we seriously considered over Rust was Swift. But Swift's just wasn't quite there yet. It might be today. If I was starting something from ground zero today, I'd probably lean towards Swift and need to be argued down back to Rust or Python.
- Sodman 4y agoThe author touches on why it matters in the article - either you have to restrict hiring to folks who are already rust experts (much smaller hiring pool, also usually meaning higher comp expectations) - or you have to consider the cost of training new/existing staff on Rust. Rust has a notoriously difficult learning curve, especially to folks who don't have a background in C/C++. As the author mentions, you may be looking at 6+ month ramp up time until new hires can comfortably write non-throwaway tech-debt free production code. For many startups looking to iterate quickly, that's just too slow. Conversely if you are looking to hire Java folks, you'll have an enormous pool to pick from, or if you need to train somebody in eg Go - you can do that significantly quicker than you could with Rust.
- dcow 4y agoI was putting that argument aside because that's an argument you can make for any language and it changes depending on who you know, what circles you're in, etc. It's and externality not specific to Rust. You can say the same for Erlang, or Swift, or C#, or ...insert language that isn't JavaScript. What I'm saying is that, disregarding the externalities, I've found Rust to be quite a boon and not inherently a bad fit for an early stage. YMMV.
- ReflectedImage 4y agoWell Python code will on average will be more correct than Rust code. I'm not sure why you feel Rust code would be more correct than Python code but it certainly isn't true.
- tcfhgj 4y agoI strongly believe that if I would code anything significant my Rust could would be more correct. The reasons are types and rusts multi threading guarantees, which become even more helpful when doing refactorings
- ReflectedImage 4y agoIt won't because the number #1 factor in bugs is the number of lines. The Python code will be significantly shorter and thus contain less bugs.
- itishappy 4y agoThat feels a bit overly reductive. I have a hard time believing GolfScript and APL are among the least error prone languages, for example.
- ReflectedImage 4y agoLeaving joke languages aside, it is very much true. If you use less lines of code to implement a software feature, the software feature will on average have less bugs. Programmers write bugs per line, something like Python which only uses 33% of the lines and thus contains only around 33% of the bugs. On the other hand, if you go down the prove things are correct at compile time you will eliminate around 5% of the bugs. So you can choice between eliminating 67% of the bugs by making the language simpler to use or 5% of the bugs by doing formal checking.
- dcow 4y agoHas someone done this analysis with Rust? I highly doubt it holds for Rust programs. Seriously.
- lelanthran 4y ago> We gain correctness. And at an early stage, correctness without paying for a massive QA team is a huge boon. Compared to what? Java, C# and Go?
- winrid 4y agoYou can write your REST API with Rust using axum and it can generate your OpenAPI docs. You can even generate a typescript client.