11
AleCx04
3y

Back when I was still in school for comp sci we had an advanced software engineering and design class with c++. At this time, everyone was expected to be proficient enough with cpp to go ahead and properly work with whatever the instructor would throw at us. And pretty much everyone was since past classes included a lot of c++ development. Of course, efficient at least related to academic studies rather than actual real world development.

Our teacher would mix in a lot pf phyisics and mathematics into what we were doing, something that I greatly enjoyed, while at the same time putting real world value concerning cpp best practices to avoid common pitfalls in the development of said language. Since most bugs seemed to be memory based he would be particularly strict about that.

One classmate, good friend and an actual proper developer now a days would ALWAYS forget to free his resources...ALWAYS for whatever fucking reason he would just ignore that shit, regardless of how much the instructor would make a point on it.

At one point during class on a virtual lecture the dude literally addressed a couple of students but when he got to my boy in particular he said: "you are the reason why people are praying to Mozilla and Hoare to release Rust as fast as possible into a suitable alternative to high performant code in C++, WHY won't you pay attention to how you deal with memory management?"

And it stuck with me. I merely a recreational cpp dev, most of my profesional work is done on web development, so I cannot attest to all the additional unsafe code that people encounter in the wild when dealing with cpp on a professional level.

But in terms of them common criticisms of C and C++ for which memory is so important to work with, wouldn't you guys say that it comes more from the side of people just not knowing what they are doing rather than a fault on the language itself?

I see the merits and beauty of Rust, I truly do, it is a fantastic language, with a standardized build system and a lot of good design put into it. But I can't really fathom it being the cpp killer, if anything, the real cpp killers are bad devs that just don't know what they are doing or miss shit.

What do y'all ninjas think?

Comments
  • 2
    Agree, I am a lazy dev, I like Ruby and the easy life it provides.

    I know for a fact that I would fuckup and rant heavily if I ever need to use C or anything that need sme to be extremely explicit.
  • 2
    @mundo03 there is a strange beauty from working with these two languages that I find absolutely fascinating.

    In particular since I have a book on interpreter and compiler development with Go and have been slowly porting code to cpp.

    There have been many "aaaaaaaaaaah shit well that was stupid of me" moments that really do make me come out as a better dev. For some reason, people tout Lisp dialects as an enlightenment type of experience, not to say this isn't true, but the biggest wow moments that ive had come from fucking around with C and or C++.

    And, on a different note.....i fucking love Ruby for the same reasons as you bro :P
  • 2
    @AleCx04
    I want to take on rust as an enlightenment soon.

    I am just not ready to manage memory myself, i would be angry all day long.

    Ruby is fucking awesome, I am ranting about v3 stuff, but I haven't tried it myself, currently using python for everything
  • 1
    C++ scares me. I don’t fuck with it
  • 3
    There's "bad devs" and there's also "code that is so complex that you'd rather have the compiler/static analyser's help" and also "good devs having brainfarts". In all three cases a better type system like Rust's helps get rid of memory bugs.

    Tbh I think Rust is growing not because it's that much better than C++ (though it is), but also because of the community and tools and the sheer efficiency of working with the language, plus it doesn't have C++'s historical bloat. It's the entire package that's really nice.
  • 0
    @10Dev it scares me as well, but I see it alongside Rust for my way to escape web development
  • 1
    @RememberMe Apparently the community is the highest selling point. I have seen some talks between them in forums etc. Very welcoming and not prone to gatekeeping or making others feel inadecuate. That alone will make it one of the most powerful technologies around since they know the majority of people accounts for the wide adoption of the project.
  • 1
    @AleCx04 you should join the Rust discord server, it's a pretty nice place
Add Comment