These are "just" some free symbols (o, I, L) used with overloaded operators (!, |, --). The rest is pretty formatting with whitespace which isn't relevant to functionality.
In python there is the term "pythonic" describing if something is in the spirit of the languages founding fathers. As in: "The most pythonic way to write this down is ..." or "Map/filter don't feel very pythonic."
What is the equivalent term or expression for being in the spirit of C++?
The article, while a joke (just like C++ originally, look it up), feels very C++y.
While what's idiomatic is subjective, I think there's plenty that everyone can agree is not idiomatic, so I think GP's quote is still pretty commonly used
I think we can all agree that actively re-purposing the postfix-- operator to perform a dereference on a smart is definitely not idiomatic.
Idiomatic might be fuzzy, but it definitely does not include active attempts obfuscation, malice or jokes. The code in the article could be any of these depending on context.
Either you come from a very different community of C++ users than I do, or you are using a different definition of "idiomatic" than I am familiar with, because that loop looks like totally ordinary, everyday C++, and is therefore precisely what I'd call "idiomatic", while I can't recall ever having seen anyone actually use std::accumulate in real life. I suppose this is part of the fun of C++, though, in that it supports a family of distinct but compatible dialects.
Python has a strong sense of purity. It is a language that really guides you into doing things one way and the community reflect that.
Not so much with C++. There is no one way to do things. Depending on your needs, you will use the language differently. Code focused on performance (ex: game engine) will look very different from server code, or a GUI, or embedded software. And none will be more C++y than the other.
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.
C++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.
If 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.
I'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.
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!
> 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.
"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.