4 ms·
I'm hoping Rust doesn't go down this path as I want a replacement for C++ badly. So that's opposed to C++'s "It takes a few years to get acquainted to the lang
by gcp 10y ago
I'm hoping Rust doesn't go down this path as I want a replacement for C++ badly.
So that's opposed to C++'s "It takes a few years to get acquainted to the language enough that people would want your stuff in production code"?
Nobody hires junior C++ programmers.
- rubber_duck 10y agoThe problem with writing C++ is not so much the language as it is the problem domain - writing C++ as "C with some syntax sugar" is possible and a popular method by people who don't care about C++ complexity. And it gets you to results fast. Having something work right away and deal with the edge cases when you encounter them is preferable in a lot of scenarios - especially while learning, but also as a principle of iterative development, a lot of the time as you're iterating on code stuff fundamentally changes (requirements change, your interpretation changes, etc.) all that formalization up front ends up being an impediment - as much as it makes some people uncomfortable.
- gcp 10y agoIs it common for code that fits those requirements to require C++ or Rust, though? Particularly in terms of performance?
- rubber_duck 10y agoDepends on the industry, from my experience in gamedev - yes.
- shadowmint 10y ago? What's your point. The parent post specific said it wanted a replacement for C++; the amount of time and effort it takes to get code right in C++ is a problem. Rust also has a long learning curve, and its hard to quickly be productive in. I don't think there's anything wrong with idly wishing there was some kind of middle ground where you could gradually or partially opt-in to the borrow checker with a nice modern language like rust to get started, and then gradually eliminate your GC parts or whatever. Many game engines use a high level language with a GC like C# or (shudder) python or blueprint which are baked by C++ for the performance critical parts. You write application logic in the scripting language, and anything that's too complex you fall back to C++ for. If rust could somehow self host itself as a high level language like that, it would be superb.
- gcp 10y agoMy point is that C++ has a learning curve that's as steep as Rust's. Rust is a C++ replacement. So this isn't a disadvantage for Rust. It may stop Rust from getting widespread adoption, but I see no problem with that. C++ isn't "widely used" either by most meanings. Rust may still largely replace C++ even without magically having a less steep learning curve. (Which it, IMHO, actually has anyway.)
- braveo 10y ago> My point is that C++ has a learning curve that's as steep as Rust's. Rust is a C++ replacement. So this isn't a disadvantage for Rust. As someone who learned C++ first and later Rust, no it isn't. Rust's learning curve is a hell of a lot higher than C++'s. This reminds me of when Java was trying to compete with C++, you would have all these Java people making claims that HotSpot was going to take over the world and make Java faster than C/C++. Only it never happened outside of a few specific cases because these people were "fanboys" in every sense of the word. You like Rust, there's nothing wrong with that. You think it's better than C++, that's your belief and I'll defend your right to believe it. But stop comparing it to C++. Just about every language over the past 20 years has users do the same thing and __C++ IS STILL KING__. You can push rust without being unfair to C++ (NO WAY is C++ harder to learn than Rust).
- AsyncAwait 10y ago> Rust's learning curve is a hell of a lot higher than C++'s I had the exact opposite experience, i.e. Rust allows me to not worry about memory safety and allows me to think on a much closer level of abstraction to my problem domain than C++.
- braveo 10y agousing != learning.
- kibwen 10y agoIf you just want to write code that runs but that will suddenly break without warning an unknowable time into the future, then C++ has a lower learning curve. If you want to code defensively and write software that isn't going to eat your laundry, then the learning curve for C++ surpasses Rust in steepness, because of the sheer number of things you have to learn not to do.