3 ms·
I use Rust at a startup, and it's been great. But I've used Rust mostly for performance-critical CLI tools, or highly specialized servers. Typically, these hav
by ekidd 4y ago
I use Rust at a startup, and it's been great.
But I've used Rust mostly for performance-critical CLI tools, or highly specialized servers. Typically, these have a narrowly defined job that must be done reliably and efficiently. Rust shines at this. These tools run reliably with almost no changes, often for years at a time.
But I have learned that it's often less useful putting policy and frequently-changed business logic in Rust. That kind of code is often accessible to more developers in a strongly-typed scripting language.
- nequo 4y ago> That kind of code is often accessible to more developers in a strongly-typed scripting language. I assume that you’re thinking of TypeScript or Python with type hints. Do you mean that these languages are more accessible because they are more widely known by developers or because codebases in these languages are easier for some reason to change frequently than codebases in Rust?
- ekidd 4y agoMostly because TypeScript and typed Python are often more accessible to more developers. One of the tradeoffs of programming in Rust is that you need to distinguish between value vs. reference, stack vs. heap, and a number of other choices like that. This helps performance tremendously. But unless most of your team is comfortable making these decisions, they add a modest tax to all Rust code written. At least compared to TypeScript. Rust is a fantastically productive language now that I know it well. There's definitely a point on the learning curve where Rust can be competitive with several popular scripting languages. But getting an entire team of programmers to that point takes a concerted effort. So for many teams, Rust is the biggest win for problems like: - "I need a server that handles a few kinds of specialized requests at high speed." - "I need a CLI tool that can process 60 GB of input data on a regular basis." - "I need to parse this file format that involves 197 special cases that I must keep carefully straight."