3 ms·
I can explain why I think initializer lists style is better. You can have a standard / uniform syntax for initialization. And it's using already defined syntax
by shmerl 11y ago
I can explain why I think initializer lists style is better. You can have a standard / uniform syntax for initialization. And it's using already defined syntax for types to actually indicate what you are creating. Compare it to the current one. It's necessary to create a new syntax for each type (that you want to enable for such initialization). I.e. a macro. This macro also is different from already existing syntax which indicates the type (i.e. you have Vec and you have vec!). That's why I think current approach is more cumbersome and initializer lists style is more streamlined and elegant.
> it should have to be by a large margin to justify adding new syntax to the language.
C++11 put some effort into simplifying some cumbersome syntax constructs. It makes things easier to read and write which pays off.