C++ takes decades to master

15 days ago by danhab99 to c/programmer_humor

load all comments
SinTan1729 61 points 15 days ago

My first ever big boy language was C++ (after Basic, and Logo, does anyone remember that lol). I was in middle school, tried to self-learn from learncpp.com, only to realize that I had mostly learned C, with cin-cout instead of printf-scanf. So I just decided to migrate to C. Nowadays, I mostly code in Rust, Go, and Python. But my experience with C has been extremely helpful. Can't say the same about C++ though.

path: 0 24149440, hotness: undefined, score: 61, children: 22
LedgeDrop 25 points 15 days ago

C++ is useful for learning object oriented programming: Describing what really happens in constructors and destructors, the pros/cons of reference counting and how it actually works (using std::unique_ptr)

These are things that most modern languages try to hide/abstract away, but the underlying problems and limitations never go away, but with C++ you'll have a better understanding of why they happen.

However, if you go down the rabbit hole of Template Metaprogramming, I agree with the original post: it takes decades to learn and really only useful exploitable in C++.

path: 0 24149440 24150563, hotness: undefined, score: 25, children: 13
SinTan1729 8 points 15 days ago

I've always preferred the functional approach to programming, so OOP never really intrigued me. That's one of the reasons why I never liked C++ or Java, but instantly fell in love with Rust. It lets me do a lot of functional style programming, while still being somewhat practical. (I'm looking at you, Haskell.)

path: 0 24149440 24150563 24151068, hotness: undefined, score: 8, children: 8
LedgeDrop 6 points 14 days ago

I've been a long time believer that some problems are better solved via OOP, others through functional programming. The perfect language would be a successful blend of the two.

Many popular OOP languages are horribly lacking on FP or it looks like an eyesore (golang, python, etc). ...and FP languages trying to do OOP are kinda awkwards (see common-lisp).

I thought Crystal Lang (a statically type checked dialect of Ruby) was going to be the "perfect language"... but the compile time performance and the lack of 3rd party libraries (like an aws SDK) really made it hard to use.

Hearing what you said about Rust has renewed my hope.

That said, I did notice that features like Coroutines have been "experimental" for nearly 9 years.

I hope I'm missing something obvious, but how would you create any sort of heavy-lifting, long running, multi-session daemon/application without having some sort of asynchronous mechanism that goes beyond threading (which is limited to the number of cores the host machine is running).

edit: cleaned up a few thoughts (prematurely hit submit)

path: 0 24149440 24150563 24151068 24156083, hotness: undefined, score: 6, children: 6
jjj 7 points 14 days ago

Async has been stable for a long time. Coroutines are just syntax sugar AFAIK.

path: 0 24149440 24150563 24151068 24156083 24160944, hotness: undefined, score: 7, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
31938
2357
7362

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

go to feed...