4 ms·
It's not as simple as Python though, most people who are writing C++ are doing so because they already know it (e.g. from school or past work) or they have no o
by helen___keller 5y ago
It's not as simple as Python though, most people who are writing C++ are doing so because they already know it (e.g. from school or past work) or they have no option (building on an existing C++ codebase). Being in the position of "I need to learn a first systems language, should I pick C++ or Rust" is not very common, IMO.
- adgjlsfhk1 5y agoThe point of rust isn't to be simple. It's to prevent all the C++ people from whining that all the higher level languages have GC. In truth, 95% of them should just be using a language with GC (i.e. C#/Go/Python), and the other 5% that claim they understand how unique_ptr works should have no problem switching to rust, because they are already running an implementation of the borrow checker by hand to verify that their code doesn't have bugs.
- FpUser 5y ago>"It's to prevent all the C++ people from whining " That's some very thoughtful and noble goal. Maybe people who use C++ (and bunch of other languages) are not the ones whining.
- adwn 5y agoFor most of my projects, I would switch from Rust to a GC language in a heartbeat, provided that it 1) is as safe and as fast as Rust, or at most 1.5x slower 2) offers "fearless concurrency" and easy, safe, and efficient parallelism 3) has sum types and a good static type system 4) has great tooling and package management (see cargo) 5) has a vibrant and growing ecosystem So far, that language doesn't seem to exist. Most fail at points 1+2.
- afiori 5y agoThe new concurrent ocaml is improving in all of them.
- sanxiyn 5y agoFor me, Haskell is already there (maybe you find its ecosystem not vibrant enough?) and OCaml will be there with multicore OCaml.
- adwn 5y agoI accept that Haskell is that language for some. As for me, I tried Haskell twice, and gave up each time: 1) reasoning about performance is just too difficult (due to lazy evaluation) 2) the community seems too focused on providing ever more abstract abstractions instead of practical solutions to actual problems 3) purity and freedom from side-effects cause a lot of friction and make many simple problems really hard; the libraries and patterns to solve that problem are too complicated for me to comprehend, so maybe I'm too dumb for Haskell (though I don't have any problems with Rust, so...)
- lucian1900 5y agoSwift and Kotlin are partial matches. Sadly, that’s about it.
- nicoburns 5y agoI don't think anyone is claiming that Rust is as simple as Python. Nor is Rust really targeting Python users. Java isn't as simple as Python either, but nobody thinks that makes Java unsuccessful. > Being in the position of "I need to learn a first systems language, should I pick C++ or Rust" is not very common, IMO. What makes you think that. Everyone who learns systems programming is in this position at some point. Perhaps not if they learn at university and the language is chosen for them, but that just pushes the choice onto the university itself. And universities are increasingly offering Rust courses. Of course, plenty of programmers aren't systems programmers and never will be. But that doesn't negate the need for systems programming languages, as demonstrated by the continued use of C and C++. If you do need a systems languages then Rust can make a good case for being the simplest. And could well become the de facto standard over the next few years.
- FpUser 5y ago>"But that doesn't negate the need for systems programming languages, as demonstrated by the continued use of C and C++" C++ uses far exceed systems programming.
- helen___keller 5y agoThat’s all reasonable, I just feel like there’s a bit of a critical mass needed to really enter the mainstream as a “de facto standard” and I don’t know if the activation energy on Rust is too high to reach that critical mass Rust to me is starting to feel like how Haskell was a decade ago, where it seemed like everybody was talking about it but serious adoption was always just on the horizon. But maybe my expectations are just too high. It seemed quite exciting at first to see everything being rewritten in Rust but I guess that’s not how the software world really works. Old projects are entrenched because they take many years of dev time to mature
- nicoburns 5y ago> Rust to me is starting to feel like how Haskell was a decade ago, where it seemed like everybody was talking about it but serious adoption was always just on the horizon. I think you might just not be aware of how widely adopted Rust already is. Google, Microsoft, Amazon, Dropbox, Cloudflare to name just a few companies already have important projects in Rust. Curl is adding a Rust backend. The Linux Kernel hasn't committed yet, but groundwork has begun and it's looking like it's going to happen. Serious adoption has already happened. You're right that we won't see mass rewrites (although there have been some). That's just too big a project. But new projects are increasingly choosing Rust. It'll be a decade before Rust is the de facto standard if it happens. But personally I consider that quite likely.
- timeon 5y agoYes python was easy but I've never really bothered with C++. It looked so hard and scary. But Rust gave me more guarantees. It was easier to start learning and do something with it.