Comment

Comment by the_duke

> Not All Programming is Systems Programming

Personally I often use Rust for "non systems-programming" tasks, even though I really wish a more suitable language existed.

Rust has plenty of downsides, but hits a particular sweet spot for me that is hard to find elsewhere:

* Expressive, pretty powerful, ML and Haskell inspired type system

* Memory safe. In higher level code you have almost zero justification for `unsafe`, unless you really need a C library.

* Immutable by default. Can feel almost functional, depending on code style.

* Error handling (it's not perfect by any means, but much better than exceptions in my book)

* Very coherent language design. The language has few warts, in part thanks to the young age.

* Great package manager and build system.

* Good tooling in general (compiler errors, formatter, linter, docs generation, ... )

* Library availability is great for certain domains, decent for many.

* Statically compiled. Mostly statically linked. Though I often wish there was an additional interpreter/JIT with a REPL.

* Good performance without much effort.

* Good concurrency/parallelism primitives, especially since async

* Increasingly better IDE support, thanks to the author of this blog post! (rust-analyzer)

So I often accept the downsides of Rust, even for higher level code, because I don't know another language that fits.

My closest alternatives would probably be Go, Haskell or F#. But each don't fit the above list one way or another.

parent the_duke 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton