4 ms·
Rust 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 op
by hathawsh 7y ago
Rust 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.