Tell me more ×
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
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
show 5 more comments

4 Answers

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

"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

'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
2  
clever is usually a derogatory term when applied to any language, usually indicating some abuse of some obscure side effect that no one in the future will easily understand at first sight, slick is pretty close to this semantic as well. – Jarrod Roberson Sep 19 '11 at 1:01
1  
Not where I come from. – Mikey Sep 19 '11 at 2:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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