Elektrine lite

← Feed

@SinTan1729@programming.dev

Post #3189141

2026-06-08 08:46 UTC

My first ever big boy language was C++ (after Basic, and Logo). 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.

Replies (4)

  • @LedgeDrop@lemmy.zip 2026-06-08 10:59

    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++.

    Open ##3191685

  • Yay, Logo I used it way too long because my clumsy asa couldn’t get another IDE to work

    Open ##3196063

  • @Valmond@lemmy.dbzer0.com 2026-06-08 20:22

    Was Logo that turtle language?

    Open ##3202032

  • Try the c++23 standard. There’s been a lot of cross pollination. Contrived example follows: #include #include #include #include int main(int argc, char *argv[]) { double pi = std::numbers::pi; std::string fstr = std::format("{}, {:>.2}, {:>.5}, {:>.10}", pi, pi, pi, pi); std::string h = "Hello"; std::string w = "World"; std::println("{}, {}!", h, w); std::print("This won't have a {},", "newline"); std::println(" but this will add it."); // Add a newline. // Can't put a non-constant string as the first argument to // print or println so they can be checked at compile time. std::println("{}", fstr); return EXIT_SUCCESS; }

    Open ##3214649