Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

There's a lot of good idioms promoted in modern C++. These include RAII and elegant use of boost or STL or a std::algorithm to solve a given problem.

Just like you can write C in any language, you can certainly write C in C++. However you can write really good modern C++ code with the right subset of features. When someone does something really cool with an STL or boost construct I always get the urge to call it "pythonic" in the sense that its the canocical elegant way to do something. Is there a term like how "pythonic" is used in python to refer to C++ code written in the modern style with modern idioms?

share|improve this question

closed as primarily opinion-based by MichaelT, GlenH7, gnat, Kilian Foth, World Engineer Apr 8 at 0:09

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

9  
How about bjarnic? –  Job May 3 '11 at 14:35
17  
Anything wrong with "idiomatic C++ code"? –  delnan May 3 '11 at 14:39
3  
"Idiomatic" as in a idiom native to the language. –  dietbuddha May 3 '11 at 14:43
3  
@OptimizePrime, when I hear code described as 1337, I get nervous that its probably too clever :) –  Doug T. May 3 '11 at 16:08
1  
@OptimizePrime That would be rather contraproductive, as professionality and cleverness are the last terms I would associate with someone speaking leetspeak. –  Christian Rau Sep 19 '11 at 11:08

4 Answers 4

up vote 11 down vote accepted

I usually call it "modern C++" and most people get what I mean by that.

share|improve this answer
6  
Maybe for c++0x we should invent a new term, we can say the code r0x. –  Doug T. May 3 '11 at 16:09
1  
and mostly they run away, screaming? –  Carson63000 May 3 '11 at 21:27

Nice question. Some of it seems to be covered by idiomatic as a more general version of pythonic; often generic code fits your requirements for modern C++ in practice.

Especially as opposed to this C-style of code, I also often call that good code simply "C++" ;)

share|improve this answer

'Slick' is a term I've used and heard for many years to describe clever, concise, well written code - from before Python was invented.

share|improve this answer

"Modern C++" as Nemanja Trifunovic already answered is well used, but the generic adjective for all languages is "idiomatic". So for C++ it would be "idiomatic C++". "Pythonic way" is the same as "idiomatic Python".

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.