4 ms·
That's a shame. C++11/14/17 each make the language better and deal with many of the might have pushed someone away in the past. The typing is getting stronger,
by sqeaky 9y ago
That's a shame. C++11/14/17 each make the language better and deal with many of the might have pushed someone away in the past.
The typing is getting stronger, the library richer and hard things easier. If you know about or can google RAII and are willing to lookup things on occasion to pick algorithms or just the right member function, code gets very clean. After not too long the looking stops because the std lib is still pretty small compared to other languages.
But if you have already moved to Rust I can't make an objective argument for it.
- jussij 9y ago> C++11/14/17 each make the language better and deal That may be true, but all you are seeing is C++ copying from every other language in an effort to once again become relevant. IMHO in this modern day and age there are so many easier, better, more expressive, easier to use languages than C++ to choose from. And that is coming from someone who spent a lot of time coding C++ some 15 years ago.
- pcwalton 9y ago> That may be true, but all you are seeing is C++ copying from every other language in an effort to once again become relevant. To be fair, that's what every other language does too. There are few truly novel ideas in industry programming languages.
- sqeaky 9y ago> an effort to once again become relevant. I was unaware that being the 2nd and 3rd most popular language made it not relevant when I guess nothing is relevant except Java. (Per the Tiobe index) If you need high level abstractions and the ability to tweak for performance at the lowest levels the it is either C++ or Rust, and if you need a mature ecosystem that really only leaves C++. Game devs, Google, Facebook, HPC and tons of stuff and now with emscripten and WASM we get to compete with JS devs for in browser games too!
- blackflame7000 9y ago"all you are seeing is C++ copying from every other language in an effort to once again become relevant." considering just about every other languages interpreter is written in C thats an odd statement. It's like saying the egg copied the Chicken.
- geezerjay 9y ago> That may be true, but all you are seeing is C++ copying from every other language in an effort to once again become relevant. Considering that C++ is perhaps the most popular programming language ever designed (in TIOBE's index it ranks 3rd, right after C and Java), you sound that you nurtured an irrational hatred for a programming language. That says more about you than the language you are trying to criticise.
- beeforpork 9y agoC++11+ is even more complex than before, so I disagree: C++ is worse now. Almost all the old crap still exists on top of the shiny new stuff. Designing classes that distinguish & and && properly makes writing new types more difficult. You need even more boilerplate stuff now. Like: I define a '-' operator, but I don't automatically get a '-=' operator, WTF. And now I need to add a && version of the -= and += and = and to invoke move() correctly so the type system is pleased AND it won't crash. This is supposed to be used for application code, so why do we need so much brain capacity to handle it? And I would really be interested in a survey to find our how many professional C++ programmers know the intricate rules behind overloading with template functions, template classes, inside and outside class scope, with namespaces, with & and &&, with const, with auto and lambda and maybe more etc. This is just too much! Using classes is a bit better now (if they are written properly), but once you start defining your own types, its no fun anymore. The nicest I can say about C++ is that it is fun if you want to experiment. But for a production system, it is not a good choice, because it is too complex.
- sqeaky 9y agoIf you aren't writing libraries you rarely need to be concerned with move semantics. At one of my two C++ jobs, literally no class has any && shenanigans and at the other.. we are making libraries, so yeah we care about that, but even then 90% "=default" is all we need. As for the old and new stuff both being there, yes it us but that doesn't mean you need or should use all of it. The new should replace the old or at least let you clean it up. It sounds like the code you were forced into was super sloppy. Making move increment and decrement operator is an micro-optimization in the extreme. You can probably safely remove that non-sense and not see any difference if your class implements something like sane value semantics and use RAII. But of course like any language someone can make a big ball of mud when misusing the tools. I agree there is complexity but I think most of the complexity you have needed to deal with is because of bad code. I could write you some Python or Ruby that is equally impossible to parse and deal with. Watch as I overload methods on Method class and Class class.
- kuon 9y agoI'm not using rust yet, I am mostly writing using higher level languages (python then elixir/erlang, also lua) with a few part in C when I need to do something C is good at. Also enjoying elm for frontend.