logoalt Hacker News

chris_wottoday at 1:05 AM4 repliesview on HN

If you can code in C#, how is C++ difficult? Are pointers and the stl that difficult?

Not denigrating, genuine question.


Replies

999900000999today at 1:18 AM

One word.

Headers.

That's just the start. The C++ build system and package managers are the stuff if nightmares. Modern languages are significantly easier to use.

Don't get me wrong, if you offer a job with a 200k base salary and give me 6 months to learn C++ I'll do it. But I won't enjoy it, and I definitely won't do it as a hobby.

show 1 reply
Kwpolskatoday at 9:03 AM

You're asking if going from a high level language to a low level language on steroids is difficult?

Pointers, manual memory management, and the design by committee standard library are not fun.

atraactoday at 8:55 AM

I write mostly backend stuff for a living, big chunk of it in Node/TS but also C# with modern .NET. I also have to dabble with Unity and Unreal both for work and a hobby project. I technically learned C++ in uni but really, I hate every single second I have to spend doing Unreal Engine work. I genuinely despise how obsolete and hard to write C++ is compared to modern languages. It didn't bother me in university because that was all I knew at the time but it's hard to justify existence of header files today. Add macros everywhere, really bad compilation errors, really hard to read syntax with a lot of unnecessary bloat and you get something that is just not likable. I'm sure you can get used to it given enough time spent in that ecosystem, but I can tell you as someone writing 4 different languages on day to day basis, C++ is difficult, and it's not because of pointers.

show 1 reply
DonHopkinstoday at 5:58 AM

Java was designed to make fun of C++, then C# was designed to make fun of Java, so you're missing two layers of fun.

show 1 reply