8 ms·
Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of
by divtiwari 5y ago
Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?
- skywal_l 5y agoYou can spend the time on it since you will make it up by not having to worry about your awful C++ dependency/build system which is the language targeted by rust to replace (/complement) ;)
- divtiwari 5y agoDo you recommend it for those developers not working in the C/C++ space?
- deleted 5y ago[deleted]
- dthul 5y agoWhether you should learn it or not I can't answer, but I want to mention that I personally don't feel anything in Rust is very esoteric. Python's metaclasses or JavaScript's prototype object model feel more unusual to me than anything I encountered in Rust. If you have never written in an unmanaged language like C++ though I could see that a lot of Rust feels foreign.
- cgh 5y agoLifetimes qualify as esoteric, I think. They seem unique to Rust (please correct me if wrong) and are not immediately intuitive.
- duped 5y agoC++ developers deal with lifetimes all the time (grep for "outlive" in a large codebase, for example). It just isn't baked into the language. The notion of the "lifetime" is fundamental to systems programming, particularly when dealing with concurrency. It's quite natural to folks who are used to dealing with use-after-free/use-after-move and iterator invalidation bugs, imo.
- nfrmatk 5y agoPersonally, I'd say it's worth it now. I've been dabbling in Rust for a few years and while I still don't get to use it at $DAYJOB it's been a huge benefit to me. Those "esoteric" concepts have bled into other languages and my usage of them, making me a better programmer overall. Read a chapter of "The Book" once a month or so over the next 3 years and I wager you'll find yourself in a better place than had you waited 3 years to start.
- divtiwari 5y agoNice advice!! Would definitely start learning it from this year itself.
- Lendal 5y agoAfter doing a couple of projects with it, I have found that learning Rust is an exercise in futility. I wish I had never heard of Rust. What will happen is you'll immediately recognize it as the greatest language ever invented and you'll want everyone else to know about it. You will try to convey what it is about Rust that makes all other languages obsolete, but they will look at you like you're a crazy person. You will be ostracized and considered a lunatic. You will lose all your friends. They will say you are part of a cult now and you will eat your lunch at a separate table. You have seen nirvana and will never be satisfied again with doing your old Python or JavaScript job. After doing a few projects in Rust, yet unable to convince your non-programmer managers why they should convert to it, doing your old job no longer brings the joy it once did. You will stop shaving and grow a long beard. Because using non-Rust languages is basically the same as living in the past. The world has lost all its color. The future is Rust, and yet the business world is too conservative, or too afraid, or too incurious to make the leap. This is how I feel about learning Rust right now.
- mamcx 5y ago> the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer I on this space and found Rust to be a great boost in my ability to ship code with FAR lower debugging (post-deployment) and hosting cost (can pay for half for more than 4x the amount of load, and not even doing a lot for improve things). Rust is already "mainstream-ish" and the amount of libraries and stuff is becoming better and better. So, I don't see any point on "wait". Sure, it will be challenging! But the benefits are too nice to pass of, I think.
- orthoxerox 5y agoRust is great as a hobby language, as it tickles some previously unutilized brain patterns. I don't think it's a great replacement for Java/C#. Unless your problem is GC pauses, either language will let you be more productive even when you master the borrow checker simply because their ecosystems are much richer. I can imagine AAA game engines slowly migrating from C++ to Rust, but enterprise applications are already fast enough in 99.9% of the cases.
- zozbot234 5y ago> their ecosystems are much richer. The Rust "ecosystem" can seamlessly expand to include any language with a C ABI and FFI. Solutions are also being developed to ease interop with managed platforms like Java/C#. Contrast this with something like Go, where even interoperability with C does not come out-of-the-box and requires compromising the most desirable features in the language itself.
- oscargrouch 5y agoThere's no "language to rule them all". Java already tried and almost ruled the world, but reality is that with options languages take here and there to whats important to them, they will never expand to a certain level. Languages compete in their axes, which for me there are mainly 4 big ones: a) System/Performance/Control: C, C++, Rust, Zig b) Application: Java, C#, Swift, Go, Kotlin, Nim c) Script/Casual: Python, Ruby, Lua, Javascript d) Domain specific: OCAML, Scheme, Haskell, Matlab I've never seen a language ruling in two axes at the same time (as in you can use it for the same goals), let alone in all four, or at least three. The a' axis are very hardcore languages with insane amount of control, but they will never be as productive as the b' and c' axis. Meanwhile the b' axis is the most popular one, as they allow you to create big and complex application while being productive. Their runtime are not far away from the languages on the a' axis. The c' axis is most productive and easy to pick up, with languages that feels more natural, but they dont have the performance of the a' and b' axis and also its hard to compose big applications on them unlike the a' and b' axis. Maybe a successor of languages like Rust and Swift might be the on to do this, but i cant hardly see Rust in that position because programming in it have more or less the kind of productivity that C++ gives you. I relax much more when i can write something in Swift instead of C++ or Rust for instance, and i would mostly choose it given the perfect match to the problem i'm solving. I think we are going for a more polyglot world, not less, and i mostly use C++, Swift and Python when i can, where you can replace C++ for Rust, Swift for C# and Python with JavaScript according to your personal tastes. But using something from one axis trying to reach for the goals better served in another axis is mostly a "when all you have is a hammer.." kind of paradox.
- PowerfulWizard 5y agoI've enjoyed learning Rust and there is is a lot I like about it, I've just been doing leetcode problems with it though and not working on large projects. In my view, the biggest advantages and steps forward with Rust the language are: 1. Memory management 2. Typing I think your listed languages all have Garbage Collection? It will probably take quite a bit of mental effort to get comfortable with memory management in Rust but it is a valuable topic if you want to understand performance and language runtimes.
- jvanderbot 5y agoI've enjoyed it, aside from my day job, as a way to learn some of the safety-first paradigms. I do think it will translate back to my work.
- zozbot234 5y ago> I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer This notion is common among those who are first considering Rust, but also quite overblown in practice. The only thing that reasonably qualifies as "esoteric" in Rust is borrow checking and lifetimes, and these can be mitigated by using very simple idioms/patterns like cloning objects via .clone() or using copy-on-write via Cow<>. You can then code with much the same convenience as e.g. Python, Java or C#, but it's also very clear where some potential gains in performance have been left off the table for the sake of rapid development.
- kaba0 5y agoDisagree - a low level language can’t really mask itself as high level, the abstraction will always leak. Don’t get me wrong, Rust is a really great language and it is a very welcome addition to the for a long time seemingly stagnant low level world, but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc —- something trivially done in high level languages. C++ tried the same thing, without luck. So for a typical CRUD app, just use one of the litany of high level language frameworks and be done with it.
- nicoburns 5y agoFor many, learning the low-level aspects of programming is the attraction of learning Rust. They want to be exposed to these concepts. What Rust does well is creating a golden pathway with guard rails through which one can learn these concepts without exposing oneself to the pitfalls of memory safety issues, thread safety issues and undefined behaviour.
- rcxdude 5y agoMany people report that learning rust made them a better C++ programmer (because the kind of habits rust enforces are things which good C++ programmers do to avoid memory problems). I would expect this would work with C as well to some degree. In that sense it may be worth learning even if you never really use it professionally.
- airhead969 5y agoDon't unless it's to advance a particular career development or personal project goal. I left Go because it became a yuppie slum of trend-seekers riding a wave and leeching rather than contributing: blog hype and too many dumb support requests/questions. Making powerful languages too easy to get started without any understanding results in burdensome, low-signal distractions of maintainers and contributors. This appears like it may happen with Rust but I hope it doesn't. It's a good thing it won't ever happen with Haskell, which is my warm safety-blanket should any particular language community implode.
- eska 5y agoI've started learning it in March when the pandemic hit and I lost my job, so I had free time. I just started by making a side project, a static site generator of course. Now at my current job I was able to use Rust for an IoT data acquisition project, and feel like I'm more productive than I am with C++, which I have 20 years of experience with. The other day the partner company which is using the output of my software admitted to me that they are chasing some weird heap corruption error in QtCore.dll, and therefore cannot hit a deadline.. I was relieved that this is a thing of the past for me now. When I run into a memory error now, it's somewhere in the unsafe code blocks I have in the wrapper around the shitty C libraries by other partner companies, that didn't document the conditions of their API properly.
- staticassertion 5y agoI learned rust just before 1.0. Probably one of my best decisions as an engineer. I now run a company where we're using it as the primary language for our services.
- grumblenum 5y agoIf you consider GitHub to be a reasonable metric of industry practice in general, then judging by these charts [https://madnight.github.io/githut/#/pull_requests/2021/1 https://madnight.github.io/githut/#/pull_requests/2021/1], I would say that going mainstream in a couple years is not very likely at all. Tiobe [https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/] paints a similar picture. The number of Rust-specific jobs advertisements also don't seem to suggest a coming wave that employers are trying to get ahead of[https://www.dice.com/jobs?q=rust&countryCode=US&radius=30&radiusUnit=mi&page=1&pageSize=20&language=en https://www.dice.com/jobs?q=rust&countryCode=US&radius=30&ra...]. I'm not aware of any real success stories with the language, either, unlike Go and the CNCF ecosystem that's the latest fashion right now. There are rewrites of GNU coreutils (ripgrep, bat), a couple components in already commercially successful software (Dropbox, Discord), a couple side-projects within large companies (fuschia OS, FirecrackerVM) and I guess terminal emulators are a big focus. You could say the same of Haskell, which is very cool, but is not going to be an industry standard in the foreseeable future. One way to think about it is that the big wave of new languages like Go, Rust, Elixir and Kotlin all sprang up around 2010. At that time, C99, C++03, Java 6 or C#2 were probably what you would have been using (honorable mentions to Python 2.7, PHP 5, and Ruby 1.8). The new languages were perceived solutions to the limitations of the mainstream languages; however, today, very many of the new features and the old points of frustration have already been addressed within these same 'boring' mainstream languages. Java 16, C# 8, and C++20 are vastly improved and have (or will soon have [check out Loom for Java!]) almost all the conveniences the new-wave offered without having to throw old programs in the bin and reimplement entire ecosystems. C++ and Rust are also so similar in terms of semantics and memory model, that I really don't see the value proposition of walking away from huge, mature projects like Qt for academically interesting type algebra. There have been some ambitious fresh-takes on things like ECS-based game engines in Rust, but I'm not aware of impending migration to these tools.
- Nullabillity 5y agoLoom is a great example of the Java designers still not getting it. Taking on a lot of JVM complexity in order to reuse the same broken API.
- JeremyNT 5y agoAs somebody who's worked mostly in very high level "loosey goosey" languages (Ruby, JS) for several years, I had a lot of fun learning Rust. I've still only used it for trivial things but it's an eye opener. When I was in college, they taught C++ as the programming language (dating myself here...). I walked away with enough negative feelings about it that I thought I just hated strongly typed programming languages that lacked garbage collection, and I thought I hated compilers that spewed errors all the time, and so I gravitated towards things like Python and Ruby. Rust has proven that I was wrong about myself. I really enjoy working with it - rust has many of the same features but dramatically modernized, and it solves so many ergonomic nightmares that I remember from C++. With rust I find that entire classes of mistakes I can make with Ruby are straight up impossible because the compiler won't let you get away with it. If you were scarred by C++, give it a shot, and it may erase some of those old battle scars.
- jeremychone 5y agoI would say definitely yes. While Rust asks the developer to worry about things they don't in other "memory managed" languages, its ergonomic and expressiveness add to the productivity. Once you get used to Rust, it becomes a net positive from a productivity side; at least this has been our experience, and you get a much more efficient and robust codebase. However, here are the following caveats: - If you have a client or employer project to do now, and you are not yet familiar with Rust, do it with your language of expertise. Rust has to be learned before starting a new real project with it. - The real challenge is the cost to train an entire team on it. - Obviously, universal languages do not exist, so if you do AI, especially modeling, use Python (for now), web stuff use JS/TS, mobile stuff, Kotlin | Swift | Dart/Flutter. You can do some Rust on mobile and even web with WASM, but those are very niche use cases.