8 ms·
I'm sorry, but from the point of view of technical merit these opinion based rants are starting to feel really disingenious. Scott Meyers has written lots of g
by fsloth 11y ago
I'm sorry, but from the point of view of technical merit these opinion based rants are starting to feel really disingenious.
Scott Meyers has written lots of good stuff on how to use C++ properly.
Yes, C++ is the rocket-octopus in a razor armour, equipped with automatically foot targeting shotguns and all the rope to hang every developer twice.
Yes it the best tool everywhere? No. Is it my favorite language? No. Is it absolutely essential for value producing programmers around the globe? Yes.
The thing is, the rocket-octopus infestation is so wide that we've learned to use it to our advantage (after a few missing foots but hey - rockets!) and understood how to deal with it's kinks and warts. We've got pretty good tools to wrangle it (Visual Studio is actually pretty good, IMO), and boy, can it go places.
The ecosystem is the main reason it's as alive today as it is. I would much rather take my iridescent paradise bird F# to work, but the sad thing is, the poor thing does not survive yet everywhere where the rocket octopus does. My pet python is much more well behaved but unfortunately it still does not have hassle free rockets nor can it survive in high performance scenarios with even more wrangling than the octopus does.
- pjmlp 11y agoYep, my point as well. For example, right now is the only native language available in all mobile SDKs. So unless one wants to add extra layers to their tools for writing portable native code, with the consequent increase in development costs, C++ is the only game in town. For example, Xamarin is great, but now on top of debugging Java, Swift, Objective-C, C#, one also needs to debug their glue code into the platform APIs. I just picked Xamarin as an example of extra layers, I think they are great.
- RBO2 11y ago> Scott Meyers has written lots of good stuff on how to use C++ properly. Scott Meyers "retired" from C++ in December 2015 (http://scottmeyers.blogspot.fr/2015/12/good-to-go.html http://scottmeyers.blogspot.fr/2015/12/good-to-go.html / https://en.wikipedia.org/wiki/Scott_Meyers https://en.wikipedia.org/wiki/Scott_Meyers). There may be a link to C++ itself don't you think? PS: I still write most of my projects in modern C++, but slowly switching to D and other alternatives.
- lfowles 11y agoThat post is less "I'm getting away from C++ because it's a poor language" and more "I'm retiring from my role as C++ advocate because there are plenty of quality resources available".
- smikhanov 11y ago> Is it absolutely essential for value producing programmers > around the globe? Yes. This is dubious. Care to elaborate what you mean by that? There is, of course, huge amount of effort needed to support existing critical software written in C++, but there's never (I'm using "never" rather than "rarely" very deliberately here) a need to start a new project in C++. Almost any alternative option is better.
- ansgri 11y agoWell, please tell me what language will be good for developing a specialized image processing system. Considering all good libraries are all C++ and maybe have Python bindings. deterministic destruction + templates + low-level memory management + the ability to ascend to full java-like OOP with interfaces really do make it my favorite language. Yes it has weird syntax and ugly default behavior, but that's a price for backward compatibility.
- fsloth 11y ago"This is dubious. Care to elaborate what you mean by that?" I meant mainly the existing status quo as you elaborated in the following sentence. "there's never ... a need to start a new project in C++. Almost any alternative option is better." I agree that for a lot of things C++ is the wrong language. For some use cases, such as libraries supporting real time graphics on multiple platforms, I'm not yet sure if yet there are better options (well, there is C but I'm pretty sure that arguing which is better of those is a matter of taste and experience).
- claudius 11y ago> I'm using "never" rather than "rarely" very deliberately here True, we could also have used FORTRAN.
- hellofunk 11y ago>Almost any alternative option is better. This is a naive comment. C++ is a very good option for a wide range of scenarios where trying to shoehorn some other trendy language in its place would be at least the same level of headaches to just learning proper C++ development. And you can also depend on C++ stability and future availability, which also makes choosing its latest high-level constructs a wise option over other new languages that compete to also offer new idioms to the programmer. C++ isn't perfect, but neither is any other language. If you really know C++, it is a logical choice for many new projects across many platforms and environments.
- Negitivefrags 11y agoYou know what? I'm going to take the controversial opinion that C++ is both the best tool for everywhere and my favorite language. C++ really has only one downside. It's hard to learn. Almost all complaints about it really boil down to not knowing the language well enough. But so what? Because once you know it well... Once you know C++ really well, you understand what it means to have no compromise. It has the best performance and the highest level abstractions in one package. It has both amazing safeguards against programmer error and the ability to break all of them if you need to. It has great portability while still giving you full access to all he platform specific features. You can feel just as at home writing a web browser or a website in C++. I could go on. You get all this good stuff and really it only really takes a few years of seriously using the language to get that good. What is a few years in a 40 year career? Also, don't believe the bullshit of "nobody really knows C++" that a lot of people claim. You can find dark corners of any language. The reason they are dark corners is because they don't come up in real code.
- hellofunk 11y agoI completely agree. I very much enjoy working in it, even after 2 years of exclusively Clojure development, I had no problems coming back to modern C++ with all its lovely functional tools and enjoy every moment of it.
- raverbashing 11y ago> C++ really has only one downside. It's hard to learn. Almost all complaints about it really boil down to not knowing the language well enough. Did you read the link and the examples shown (std::chrono one, for example) Yeah, in the time I go around trying to solve C++ self-inflicted tangles I can learn Go or code stuff in Python (or even Java/C#) which 99% of the cases is fast enough I used to advocate for complex stuff, but now I think differently. Solve my problem, I don't care about religious issues.
- quarktasche 11y agoI don't think the std::chrono example is fair at all. In the C++ case, you specify which clock you want. What kind of clock is DateTime.UtcNow()? Is it monotonic? What's the resolution? It's maybe in the documentation, but if the author refuses to remember simple syntax, surely he won't want to remember such details either. The author also chose an example where he abuses the default behavior in the C# case. The last line in the C++ example just vanishes if you use the default behavior in both cases.
- HelloNurse 11y agoOpinion-based rants? No, ignorance-based rants, with a level of malevolence that doesn't appear in good faith. From claiming that "if you make all header libraries you’ll have a lot of copied code – the binaries will be larger", to blaming IDEs for the opaqueness of Cmake and Autotools, from deploring namespaces because "the programmers will end up doing a using namespace" to comparing a trivial std::chrono::duration_cast code example from cppreference.com to a C# example that does much less, it's one of the worst pieces of FUD I've ever read. The only valid point is C++ IDEs not being too good, but even that has deeper reasons than Visual Studio rightfully disliking incompatibly compiled libraries or "it sucks as an IDE".