News for hackers. Stuff that matters.
Re:The long arrow operator in C++ by std_throwaway on Thursday July 13, 2017 @02:03AM (#14759066)
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.

Re:The long arrow operator in C++ by barsonme on Thursday July 13, 2017 @02:12AM (#14759104)
I think the word is "confusing"
Re:The long arrow operator in C++ by TallGuyShort on Thursday July 13, 2017 @03:50PM (#14764571)
I was once taught, "In C, calling a solution 'interesting' is a compliment. In Python, that's an insult. Maybe we should go with "interesting".
Re:The long arrow operator in C++ by xsmasher on Thursday July 13, 2017 @02:06AM (#14759079)
"Such-and-such is (not) idiomatic C++"
Re:The long arrow operator in C++ by 0xbear on Thursday July 13, 2017 @03:27AM (#14759390)
I don't think there's broadly "idiomatic" C++. There's "idiomatic Google C++" though.
Re:The long arrow operator in C++ by int_19h on Thursday July 13, 2017 @03:06PM (#14764196)
Not in a literal sense of the word, perhaps. But in practice, "idiomatic C++" is taken to mean STL- and Boost-like.
Re:The long arrow operator in C++ by saghm on Thursday July 13, 2017 @10:57AM (#14761790)
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
Re:The long arrow operator in C++ by sqeaky on Thursday July 13, 2017 @11:26AM (#14762082)
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.

Re:The long arrow operator in C++ by saghm on Thursday July 13, 2017 @12:50PM (#14762852)
Yep, no arguments here!
Re:The long arrow operator in C++ by wyldfire on Thursday July 13, 2017 @08:30AM (#14760698)
The code from the article isn't merely "not idiomatic C++", but I would go so far as to say it's abused or obfuscated C++.

An example of non-idiomatic C++ might be

    for (int I = 0; I < c.size(); I++) {
        Total += c[I].foo;
    }
...instead of using std::accumulate. The code from the article is (humorously pointing out) something else entirely.
Re:The long arrow operator in C++ by marssaxman on Thursday July 13, 2017 @04:51PM (#14765108)
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.
Re:The long arrow operator in C++ by strictfp on Thursday July 13, 2017 @02:49AM (#14759246)
"This is not confusing enough to be considered C++"
Re:The long arrow operator in C++ by skj on Thursday July 13, 2017 @07:28AM (#14760396)
The article where bjarne describes C++ syntax as a joke and programmer job security is a parody.

http://www.snopes.com/computer/program/stroustrup.asp

Re:The long arrow operator in C++ by pan69 on Thursday July 13, 2017 @02:07AM (#14759082)
Not sure if there is such a thing but if not, maybe it could be "Stroubie".
Re:The long arrow operator in C++ by TeMPOraL on Thursday July 13, 2017 @02:13AM (#14759111)
As in something you could end up in? "Using long arrow operator in production will get you into strouble".
Re:The long arrow operator in C++ by GuB-42 on Thursday July 13, 2017 @03:00PM (#14764136)
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.

Re:The long arrow operator in C++ by Black-Plaid on Thursday July 13, 2017 @03:20AM (#14759370)
Possibly "Bjarney"
Re:The long arrow operator in C++ by skocznymroczny on Thursday July 13, 2017 @02:16AM (#14759126)
undefined behavior
Re:The long arrow operator in C++ by philipov on Thursday July 13, 2017 @11:31AM (#14762117)
Python has zen. Zen is the basis of what is considered pythonic. C++ does not have zen; the language was designed by committee.
Re:The long arrow operator in C++ by AnimalMuppet on Thursday July 13, 2017 @12:23PM (#14762609)
Not really. C++ was designed by Stroustrup; a committee then modified it somewhat.
Re:The long arrow operator in C++ by hinkley on Thursday July 13, 2017 @02:20AM (#14759140)
Stroustrupian