7 ms·
For me 2022 was the year of learning C++ (background in C# and Php) and I must say that after being intimidated by the language (extensive use of pointers, stac
by uwuemu 4y ago
For me 2022 was the year of learning C++ (background in C# and Php) and I must say that after being intimidated by the language (extensive use of pointers, stack/heap compile/run time allocation and deallocation, templates) for years, when I really took a proper look and got some practice, it is an incredible language. The command an control you get by working with memory and the system on a lower level is amazing. I found it so much easier to learn (once I got the grasp of the cpp way of doing things) than something like Rust. All the higher level advanced concepts work and flow beautifully as you'd expect based on the lower level of the language... and the amount of "magic" is kept to minimum... you can just open std and look at what is being done and it all males sense. I understand why people want to move from C++ but as a newbie in this language, I find it amazing.
- meindnoch 4y agoWhy was this comment flagged? C++ haters... really?
- alphanullmeric 4y ago[flagged]
- Yoric 4y agoAll the Rust programmers I know are really happy to discuss the limitations and shortcomings of the language. It's possible that the problem you're pointing at comes from the word "reddit" rather than "rust" :) Note: I've looked at the parent's comment history. The only one of them which was not a troll against Rust was a troll against the EU. I'll stop feeding the troll.
- alphanullmeric 4y ago[flagged]
- School-Cotton 4y agoNobody is “getting personal” on this thread.
- School-Cotton 4y agoWe use rust full time at my job, and griping about the language’s rough edges is a common pastime. The fanboys are loud and obnoxious but I can assure you they don’t make up the whole rust community.
- zozbot234 4y agoRust has its rough edges, but what people do is gripe about those in language development spaces. Then the rough edges get filed down in the next release trains, or sometimes the next language edition. In C++ they are totally unfixable.
- fckgnad 4y agoIt doesn't deserve a flag, but the sunny optimism feels delusional. It's obvious that C++ has problems and there's obvious red flags like why someone like Linux Torvalds vehemently hates the entire language. The poster addresses none of this and has a overly positive attitude towards C++. There's obvious nuance on this topic that the post fails to address and he instead just preaches to a biased choir. At least he admits he's a beginner.
- eps 4y ago> I find it amazing. This shall pass :) The main beef with C++ is that it's just a mass of every single feature possible held together with some goo. It works, but there's no grace and elegance.
- HarHarVeryFunny 4y agoYes, but I think this is the ultimate fate of most successful languages. New languages start small and elegant, and everyone raves over them, then over time new features get added, and added ... and eventually the elegance and othogonality disappear. If this was a program rather than a language, now would be the time to refactor, but you can't because of backwards compatibility, so eventually you get to c++-like bloat. I actually like c++ -, but it's definitely out of control at this point.. although many people just ignore the bleeding edge features and basically code in something closer to c++11. Languages really need to evolve to stay alive, but the evolution will eventually kill them!
- fwsgonzo 4y agoIt is really only the fact that everyone writes C++ a little bit differently. From the outside this looks like C++ is a mess, but in reality, you can pick and choose what you like, and that's exactly what people do. You can be as safe or as unsafe as you need to be. That, of course, also opens the door for beginners to accidentally write unsafe code for a long time before they know all the footguns. I think the real dent in C++ comes from wholesale improvements to languages by adding package management, one-liner built-in toolchains, built-in testing and build system. I could write paragraphs about why this is a good thing but we all know why. CMake is making an effort in making it easy to fetch content for your build system, including Git repos, so there are paths to take today, but you need to learn a lot of separate things just to get started with C++. What are the chances that a beginners C++ tutorial gives you all the best practices in a way that a newer language does by default? Learning C++ will probably look like the experience of using a web server with poor defaults, a strange configuration language, and thousands of different tutorials detailing a 20-year period of changes. If I were to host content today I would not use Apache or nginx - I would probably start with Caddy and go from there.
- singularity2001 4y agoIt's all sunny until valgrind / asan fail to reveal the source of an elusive "Uninitialised value was created by a stack allocation"
- bjackman 4y agoI work on a C++ project and actually sympathise with this sentiment. It's a massive strategic risk to our org, we pay a consistent tax in reduced productivity and stupid bugs, and I will advocate migrating away as soon as we have a suitable destination (Carbon looks promising). But, I do also really enjoy writing C++! I'm optimistic that writing Carbon/Val/whatever ends up gaining traction in the industry will be just as good though.
- e145bc455f1 4y agoAre you using legacy C++ or modern C++?
- bjackman 4y agoQuite modern! A few of the latest features we don't use yet but overall it's pretty up-to-date. Also no exceptions.
- UncleOxidant 4y ago> All the higher level advanced concepts work and flow beautifully as you'd expect Are we talking about the same language? C++?
- wiseowise 4y agoAlso started learning C++ last year. Can concur.
- UncleOxidant 4y agoWhat resources were you using to learn C++ that made "All the higher level advanced concepts work and flow beautifully"?
- wiseowise 4y agoA tour of C++, third edition.
- Markstar 4y agoYep, I totally agree. I took a long break from C++ after I learned the basics at university. I got into it again one and a half years ago when I needed really fast code and I was pleasantly surprised how easy it is. I'm exclusively using smartpointers and I very rarely run into scenarios where I have problems with memory leakage, etc. Since I had written the prototype in Java and now interface with Javascript/Typescript, I'm really amazed how clean and well-reasoned my C++ side of the program is. So yeah, I'm also really happy with the state C++ is in right now.
- opportune 4y agoI agree. It is honestly a fine language IMO and while I have nothing against Rust, I also haven’t had much of an interest or incentive to use it. Yes, buffer overflow is a thing - it’s never been an issue in my experience. Use after free and memory leaks are infrequent, easy to fix, and caught early. Golang is not a real replacement because 1. Golang core devs are too opinionated on random shit and make some things very hard to do without reinventing the wheel because “you shouldn’t do that” partially because it’s a corporate-owned language 2. GC. There are other minor things but those are the big ones, it’s still an excellent backend language but can’t replace C++. Besides Rust everything else is a toy without stability and backwards compatibility and/or lack of libraries. Rust is fine, it’s just that the problems it tries to solve aren’t something that experienced C++ devs often struggle with.
- chronial 4y ago> Besides Rust everything else is a toy without stability and backwards compatibility and/or lack of libraries. Rust is fine, it’s just that the problems it tries to solve aren’t something that experienced C++ devs often struggle with. The single main reason for Rust's success is that this statement was proven wrong again, again and again. C/C++ devs kept repeating it, severe bugs keep getting discovered.