@djork said:
@fist-poster said:
I fail to see, however, why you think it is necessary for one person to understand all the details of the language. You can be fairly proficient in it without ever touching things like template metaprogramming (which is something that already exists in C++, and not nothing that is going to be added just now).
You can be "fairly" proficient in Python by stuffing everything in Java-style class structures and never using a list comprehension, but you'd be an idiot if you did. Understanding the language means taking full advantage of the facilities it provides. Nearly all of the features of a language can be utilized in making more correct/fast/small/elegant code.
C++ makes it much impossible for one person to write the best code possible at any given time.
I'm not talking about libraries here. I'm talking only about syntax.
I feel you are comparing apples and oranges, though. List comprehension is part of the Python syntax (if I'm not mistaken), template metaprogramming is a specific coding technique (I'm not even sure if templates were designed in C++ with metaprogramming in mind in the first place, or was this technique discovered later). Enums as a syntax feature are not complicated, templates (although there are some obscure corners) - at least as far as the code example is concerned - ain't that hard either. The hard part is putting 1 and 1 together and realising you can force the compiler do something at compile-time this way.
I mean, you may know everything there is to know about the syntax of bitwise operators, and it may still not click that this way you could represent several boolean states in a single variable.
I'm also not sure whether you can even always achieve correctness, speed, smallness and elegance at the same time. But this probably also depends on what is considered elegant in one or another language. If I nest several list comprehensions and do stuff on a single line that would take a page in C++, would that be considered elegant by Python programmers?