7 ms·
Anything Rust gets the post to number 1 spot. What makes Rust special that other programming languages don't enjoy ?
by rammy1234 7y ago
Anything Rust gets the post to number 1 spot. What makes Rust special that other programming languages don't enjoy ?
- brians 7y agoA possibility to displace C and Java. Features like Haskell—destructuring bind, useful type system. Performance like C, including no GC.
- monocasa 7y agoDeterministic memory and object deallocation combined with memory safety, and a vibrant open ecosystem.
- pradn 7y ago1) It's built in large part by Mozilla, which enjoys special love as an OSS company. 2) Rust provides tangible benefits (memory/concurrency safety) over existing languages in an important niche (performance-sensitive programs). 3) The community is nice and talented so it's fun to see what they're up to.
- ggregoire 7y agoStrong static typing with types inference. Memory allocation manually handled, no garbage collector. C-like performances. Makes it a good option when reliability and performance matter (think web browser, database or anything at the OS level).
- hathawsh 7y agoRust is very ambitious and unusually successful at reaching its ambitions. It's efficient like C/C++, but safer. It's modern like Go, but more expressive and open to metaprogramming. It's often as readable as a scripting language, but doesn't depend on garbage collection. It's a young rising star originating from a great company.
- hu3 7y ago> often as readable as a scripting language I beg to differ. If anything, Rust is often cited as being hard to read.
- andrewflnr 7y agoSame here. Rust code tends to be dense. It has its moments, but I wouldn't compare it to a scripting language.
- steveklabnik 7y agoI'm sitting in a Rust talk at a conference right now, and the speaker has slides comparing the syntax to Ruby/TypeScript/Python. "You already basically know Rust" A lot of the fancier stuff is very different, but there's fairly close parallels to most of the basic syntax.
- hu3 7y agoCode that fits in a slide is hardly evidence for readability. Not to mention one could hand pick examples which is what I'd expect from slides of a talk.
- andrewflnr 7y agoBasically everything Algol-descended has close parallels in the syntax. That falls apart as soon as you hit a turbofish. I'm not saying the language or even the syntax is bad, but I think it does earn its reputation for being a little hard to read.
- steveklabnik 7y agoEven the turbo fish is consistent with other languages’ syntax: :: for scopes, <> for type parameters. Regardless, you almost never need to write the turbofish, so I think it also falls under niche syntax.
- i_dursun 7y agoIt’s like Rust is child of Python and Ruby but the real father is C++.
- exacube 7y ago> It's often as readable as a scripting language IMO only if you're using doing simple things the standard library provides utilities for. i haven't found it to be very readable once code grows in complexity, but i'm also not very experienced.
- hathawsh 7y agoI agree that libraries have a major impact on the perceived readability of a programming language. As an example, it used to be quite messy to issue HTTP requests from Python, but then the Requests library appeared, and suddenly it became much easier to write readable client libraries. Rust code will become more readable as its libraries mature.
- deleted 7y ago[deleted]
- pjmlp 7y agoUnfortunately Ada isn't as trendy. So we need Rust for younger generations.
- enlyth 7y ago> often as readable as a scripting language Rust code is littered with things like |_|, (|&(&x, _), &mut, &'a and Result<(), Box<dyn std::error::Error + Send + Sync>>. It's anything but easily readable.
- rebotfc 7y agoIt can be as fast as C++ whilst at the same time suffering from none of these bugs: https://www.youtube.com/watch?v=lkgszkPnV8g https://www.youtube.com/watch?v=lkgszkPnV8g
- jnbiche 7y agoRust is the first language basically ever that has a serious chance at displacing C and C++. Combined with a type system that eliminates multiple error classes, and some functional aspects, it's a very interesting language.
- topspin 7y ago> Anything Rust gets the post to number 1 spot This is bunk. Simply run this search[1] and behold the stream of Rust related submissions that get no play at all; zero comments and no more than one or two up votes. These instances of highly ranked rust stories are actually the exception; no more than one or two a week typically. The rest of the Rust stuff is seen by almost no one. [1] https://hn.algolia.com/?query=rust&sort=byDate&prefix&page=1&dateRange=all&type=story https://hn.algolia.com/?query=rust&sort=byDate&prefix&page=1...