|
|
|
|
|
by thatcodingdude
2142 days ago
|
|
Thanks. Rust has been recommended a bit in this thread so I'll check it out. Out of curiosity, what's the appeal of learning Rust ? What kind of projects do you use it for ? I find that I can solve mostly everything with a blend of PHP/JS, but I also never escaped web CRUDy stuff, and PHP is very well suited for these. |
|
Personally I would say learn it because it's one of those languages that changes how you think about programming as a whole and learning it will make you a better programmer in every language.
That said, I think Rust shows the most promise in a few places:
1. Pretty much anywhere you'd historically use C or C++.
2. WASM
Because Rust can expose C style FFIs you can use it to speed up hot code paths in almost all scripting languages(Python, Ruby, PHP, JS etc). This can be very useful because it allows you to keep most of your code in the scripting language that you and your collaborators are familiar with, while benefiting from Rust's strengths too.
For WASM I think Rust is currently the best choice, it has excellent tooling to work with the web, it's by far the most approachable suitable language for someone who already knows JS, and it doesn't have a big runtime or GC which makes many languages non-starters for the WASM usecase.
Some people would tell you it's a good choice for general purpose backend and there is an ecosystem around that, but I would say if that is your goal Rust offers nothing that Go doesn't do better or at least as well.