5 ms·
I got into using Rust fairly recently (after using Go and Python almost exclusively for the past few years) and I just want to say that this is the first time i
by smbv 5y ago
I got into using Rust fairly recently (after using Go and Python almost exclusively for the past few years) and I just want to say that this is the first time in a while that I've really enjoyed programming.
It's like C, but not C? I love it.
- vascocosta 5y agoPython and Go are also the main languages I've been using for the last decade. Noticing all the hype around Rust recently is prompting me to learn a new language. The last time I learnt a language from scratch was Go around 2010. Go was fascinating to learn, precisely because it looked like C, but it wasn't. Another aspect that makes me love Go is its minimalism and concurrency features. I also used to enjoy C++ and Java quite a lot for larger projects, so tell me, can I expect Rust to somehow remind me a bit of Go in comparison to C++ and Java? In other words, a simpler, more concise and more enjoyable to use version of C++ for instance?
- masklinn 5y ago> can I expect Rust to somehow remind me a bit of Go in comparison to C++ and Java? Nope. Go and Java are about on the same "complexity plane" (Java is there 20 years later and having made different choices obviously, but the original java was not so different). Rust is a much more complex language, in large part due to its purpose. It's often compared / conflated with Go because they arose around the same time, because the initial versions of Rust were much closer to applications languages (and Go e.g. runtime, green threads, segmented non-C stacks, …), and because Go's designers misleadingly called Go it a systems language. Rust is more like taking OCaml, or Haskell, painting it in a C/C++ livery, and making it suitable as an actual replacement for C with all that implies.
- eikenberry 5y ago> Go's designers misleadingly called Go it a systems language. I think one definition of what a systems language is one that you would use to write operating systems. I'd also call K8ts an distributed operating system and Hashicorp tools as components of one. Doesn't seem a huge stretch to call Go a modern systems language.
- masklinn 5y ago> I think one definition of what a systems language is one that you would use to write operating systems. Sure. > I'd also call K8ts an distributed operating system K8S is less of an OS than systemd, and systemd is not an OS. I mean you can call a pebble a raccoon if you want. > Doesn't seem a huge stretch to call Go a modern systems language. Then nothing isn't a systems language, and congratulation you've pasted one more word into complete meaninglessness. Thanks, but no thanks.
- takeda 5y agoWith such definition everything is a system that's operating (doing something). With that definition the term becomes meaningless. Systems language has a specific meaning and Go doesn't fit that criteria.
- takeda 5y ago> Nope. Go and Java are about on the same "complexity plane" (Java is there 20 years later and having made different choices obviously, but the original java was not so different). That's actually a very good point. I think a lot of people forgot about it (I did). Java started very simple and then it just got enterprisy frameworks and best practices. I'm wondering how Go will look in 20 years.
- JoshTriplett 5y agoI'd certainly agree that the initial learning curve of Rust can be substantial, wrapping your head around things like the borrow checker. It was for me. But I'd never put it in the same tier as a completely different programming model like functional programming. It's still fundamentally a procedural language. Coming from C, I found Rust simpler than idiomatic modern C++, for instance.
- 46756e 5y agoAs someone who recently learned Go as well as Rust, I would definitely say they are very different (but both great!) Go is way more minimalist and easy to quickly get some code going. Rust has a lot more moving parts when writing, so it takes more thought to write, but it’s great for large projects because it’s fast and its features make it scalable (with a lot less worry about bugs).
- omegaham 5y agoFrom personal experience learning the language - despite its syntax, Rust inherits a lot of its concepts from OCaml and Haskell rather than C++ and Java. If you program stuff in Rust the same way that you would program it in C++, you're going to find yourself constantly fighting the borrow checker and having a rough time of it.
- masonj188 5y agoI came from Go and found it to be reasonably straightforward to learn Rust. I'm definitely not a Rust expert but I found it to be fairly similar. Structs and no classes, defining methods on structs, lots of the stdlib (like IO) uses reader and writer interfaces, etc.
- takeda 5y ago> It's like C, but not C? I love it. I believe more appropriate is comparing it to C++ since Rust is a higher level language than C.
- forgotpwd16 5y agoIt seems it's pretty common for people to compare Rust to C, something that C devs understand it makes no sense (e.g. [1]). [1]: https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-replacement.html https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-repl...
- steveklabnik 5y agoNot all C developers agree with Drew: http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeymoon/ http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeym... (And all of the previous posts he’s made on this subject)
- forgotpwd16 5y agoDoes the article you linked necessarily contradicts Drew points (C's portability, spec, implementations, stable ABI, and safety isn't always needed)? Yes, Rust may be a better choice for some (many) use cases but you cannot say it's "like C" or "better C". Like how you wouldn't (I guess) refer to Go as like or better Python although many Go devs are former Pythonistas.
- steveklabnik 5y agoMaybe this exact one doesn’t say exactly against that specific article. It’s not a direct response to it, so it wouldn’t. But the line some people espouse is “Rust is a new C++ not a new C and C programmers who don’t like C++ would never like Rust,” and while some folks do feel that way, it isn’t universal. That’s all I’m saying. C programmers are numerous and in a variety of fields doing all sorts of things, pretending you can speak about this stuff as though there’s a monolith of opinion is a category error, in my opinion.