Live data from Hacker News

Exploring Rust (from C#)

nblumhardt.com

1–10 of 132 posts

Re: Exploring Rust (from C#)

#5
post #3

Could someone explain why Rust is so damn popular/controversial?

It guarantees memory safety without a GC. The result is a high performance language that doesn't require manual memory management like C or C++, and generally consumes less memory, as noted by the Dropbox guys. It's an expressive language which is also suitable for systems programming. It's a more modern language than Go (in the sense that is incorporates modern features, unlike Go which keeps things simple by sticking to familiar features dating back to the 70's), but does require more time to learn.

Re: Exploring Rust (from C#)

#6
post #3

Could someone explain why Rust is so damn popular/controversial?

It guarantees memory safety without a GC. The result is a high performance language that doesn't require manual memory management like C or C++, and generally consumes less memory, as noted by the Dropbox guys. It's an expressive language which is also suitable for systems programming. It's a more modern language than Go (in the sense that is incorporates modern features, unlike Go which keeps things simple by sticki…

Rust is also an absolute pleasure to write. It feels like a functional Ruby (minus the bad parts) with types. The RAII is natural; writing C++ feels cludgy by comparison.

Cargo is absolutely brilliant, too. It's better than NPM.

I'm writing most of my new side projects in Rust now, FWIW.

Re: Exploring Rust (from C#)

#7
I like the author's attempt to explain Rust's borrow checker to a new audience by inventing a variant of C#. Lifetimes are certainly one of Rust's most unique features, and the existence of analogies to express unfamiliar concepts in terms of familiar ones is very valuable.

Re: Exploring Rust (from C#)

#8
post #3

Could someone explain why Rust is so damn popular/controversial?

I think a lot of people are looking for a replacement for C++ that isn't C#/Java. As in a language that is still low-level enough to offer stuff like pointers, but without the pitfalls and minefield which is C++ (a lot of which is due to historic reasons and backwards compatibility with C).

Some newer languages that try to fill the niche are D, Nim, Rust and Go. Can't say much about Nim, it seems to be in the background. Go started as a systems programming language, but since then they backed out on it and it's mostly pushed as nicer C and webservice language. That leaves D and Rust on the field. Both are competing for the same audience, but Rust has the advantage of a popular brand backing (Mozilla) and a potential killer app (Servo, Mozilla's new work in progress browser engine). It also seems to have a clearer vision because of Mozilla backing and constant dogfooding in Servo. Meanwhile D is more of a design by community, as a result it gets not always the features that are needed or people want, but the features people are willing to work on. Also, D gets a lot of backlash from the game dev and system programming languages communities for using a (not too great) garbage collector, whereas Rust uses memory management somewhat similar to C++ model with RAII/smart pointers, however greatly improved and with much stronger static checks.

I think people just view Rust as the language that could actually be the alternative to C++, because there is a place for a language that is safer to use than C++, yet performs at similar speeds and doesn't handhold you like C#/Java do.

Re: Exploring Rust (from C#)

#9
post #3

Could someone explain why Rust is so damn popular/controversial?

Relatively recent, trying for a fairly rarefied "niche" (that of C and C++) which many believe has issues (C++) and for which improvements have been in short supply, brings some innovations and safety to said niche (mostly decades-old FP stuff, but affine types are a bit more original, not exactly novel but not in common use either)
Post reply on HN