Live data from Hacker News

Ask HN: Learn C++11 or Rust in 2022?

news.ycombinator.com

121–130 of 161 posts

Re: Ask HN: Learn C++11 or Rust in 2022?

#122
While it may be tempting to learn C++11 now, the current industry standard is Rust.

C++11 is a well-known and popular language for software engineering, but was released in 2011. Most programs written in C++11 are being updated or rewritten in Rust because of its simpler syntax, more modern features, and generally easier development process. Additionally, many companies will hire programmers that specialize in Rust over those who specialize in C++11.

Although it is possible to find jobs doing C++11 development, we would recommend learning Rust instead.

Re: Ask HN: Learn C++11 or Rust in 2022?

#123
post #115
post #88

Earlier quoted context omitted.

Fully disagree. Understanding pointer semantics is a pre-requisite for understanding RAII.

I know C++ since 1993, I am quite curious how pointer semantics have anything to do with RAII.

Yeah, doesn't make sense. Pointers are less useful in C++, because we have better things now.

Re: Ask HN: Learn C++11 or Rust in 2022?

#124

Earlier quoted context omitted.

> Most real-world code (by number of codes and lines of code) is something else than C/C++ nowadays, just because of developer velocity and a larger hiring pool. This is simply not true. Examples of major software that is being actively developed: - Lots of compilers/runtimes (gcc, LLVM (which Rust builds upon), Java/JDK/JVM, Swift, node.js) - All major browsers and browser engines (Chrome/Chromium, Firefox, WebKit)…

Again, this is a tiny portion of actual coders. The amount of people actually _making_ compilers and runtimes is multiple orders of magnitude smaller than the people using them. Same with browser engines and game engines. For every coder doing the actual engine, there are a hundred others just using the engine, not touching C++. You did list a pretty substantial portion of the segments where C++ is a valid choice and…

It's not like they are equivalent. I'd rather stop programming (or any kind of computer science related career) rather than take a job doing business Java or writing game logic in Lua or C#.

Re: Ask HN: Learn C++11 or Rust in 2022?

#125
post #120
post #117

Earlier quoted context omitted.

I agree those are downsides. But I think memory safety matters more in the problem space where c++ is relevant. I understand that's debatable, but I think the historical evidence suggests that it is impossible to write memory-safe c++ code beyond a fairly low complexity threshold.

Indeed, however memory-safe c++ isn't on the top list of what makes GPGPU, HPC/HFT, LLVM/GCC relevant in the industry, as such, those ecosystems won't be jumping into Rust anytime soon. Some recent examples, Apple recently added support for using Metal from C++ instead of Swift secure bindings, Android now supports Rust at the OEM layer, no roadmap for NDK/AGK support for anything beyond C and C++, Azure Sphere is "s…

Agreed the spaces you’ve enumerated make sense for c/c++ still because trading off memory safety is a sensible engineering decision given the current state of things. Unfortunately security vulns can still sneak in there though :/

Re: Ask HN: Learn C++11 or Rust in 2022?

#126
post #98
post #93

Earlier quoted context omitted.

It’s funny because I get the magic impression from c++ but not from rust. Stuff like copy semantics in C++ is so absurd. Rust is explicit and by design not particularly magical.

I agree, and let's not even start with operator overloading. Rust on the other hand seems to be a safe but also rather explicit language (a good thing not just for system programming).

Yeah the list really does go on… the number of high powered foot guns is truly terrifying

Re: Ask HN: Learn C++11 or Rust in 2022?

#127

While it may be tempting to learn C++11 now, the current industry standard is Rust. C++11 is a well-known and popular language for software engineering, but was released in 2011. Most programs written in C++11 are being updated or rewritten in Rust because of its simpler syntax, more modern features, and generally easier development process. Additionally, many companies will hire programmers that specialize in Rust o…

I love rust, but you are living in a bubble if you think rust has already managed to become the industry standard.

Re: Ask HN: Learn C++11 or Rust in 2022?

#129
post #95

Earlier quoted context omitted.

C/C++ have proven themselves impossible to write in a secure manner at any useful scale. The evidence is overwhelming.

C and C++ are the most common languages in avionics and space

written by trusted expert programmers.

Re: Ask HN: Learn C++11 or Rust in 2022?

#130
post #51

> I see a lot of criticism/hate of C++ lately (mostly due to the comittee), but the tooling and libraries are there for multiple areas. I like C++ and my main caveat is that you don't just write C++. You also have to get good at tools like Valgrind and develop a deep intuition and understanding of what the language does under the hood. That's going to require a significant time investment and some people just don't h…

Surely in any language you would have to learn tooling ? What happens when your user report performance problems on Python, Java or JS programs, you surely use some profiling tool there, no ?

If you use Python and JS chances are you do some form of web development, where most performance issues have to do with I/O, and most of those I/O issues are caused by bad queries. It ultimately comes down to using application performance monitoring software and analyzing query plans. Memory issues are an oddity and are usually caused by users doing stuff like uploading gigantic files.
Post reply on HN