Log in

No account? Create an account

Previous Entry | Next Entry

joining the Rust cult

So, programming languages. Years ago I'd run across D, aiming to be a better C++, or even a better Python -- enabling high level coding without giving up type safety or speed. It had lots of features, including contracts from Eiffel, and being functional friendly; overall it seemed like a language I'd design. It was cool, but I didn't code actively enough to bother learning it.

Last weekend I did start, but also started on the new cult kid, Rust. I went in parallel a bit, but Rust has pulled ahead.

D is not very exciting or revolutionary; it's like a better done kitchen sink. There's a lot of value in that, and in what it's trying to be, and AFAICT the language itself is pretty good. I've seen people criticize the toolchain, and uptake has been rather modest -- though the forums do see daily activity, at least.

Rust, OTOH, is trying to be revolutionary: compiler-enforced memory safety, meaning not just no memory leaks but "fearless concurrency", where the compiler would enforce no data races in multithread code unless you did something specifically unsafe. "No leaks" doesn't sound exciting unless you're an engineer who's had to worry about them; "safe concurrency" is potentially sexy to lots of people.

On diving in, I noticed something else sexy to me: it's like the unholy love child of C and ML and other functional languages; one blog post even called it a functional language in C clothing. Enums/sum types/algebraic data types/tagged unions, which I quickly fell in love with while playing with Ocaml; 'traits' or type classes a la Haskell, which serve for generics, dynanmic dispatch, and overloading, all with one coherent mechanism; hygienic macros a la Scheme, something I thought I'd never get to play with seriously unless I got into Clojure. Also, supposedly, an easy and powerful package system, and a minor taste of mine, nested comments.

See the comment count unavailable DW comments at https://mindstalk.dreamwidth.org/485363.html#comments


Damien Sullivan

Latest Month

October 2017


Powered by LiveJournal.com
Designed by Lilia Ahner