|
|
|
|
|
by cldr
4629 days ago
|
|
This isn't really a fair criticism because: 1. You picked probably the most verbose way to do it. 2. It's not valid C++ because you're assigning a pointer to a value. 3. Idiomatic C++ doesn't use `new` explicitly anyway 4. The `d = {}` of Python is not really equivalent. My feeling is that python gains brevity in exchange for putting a heavier mental load on the programmer, which is manageable for small programs but becomes unwieldy for larger ones. |
|