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.
Idiomatic C++ would allocate everything possible on the stack, and if that wasn't possible, use `make_shared`/`make_unique`. So maybe I will change it to say "doesn't use `new` directly".
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.