3 ms·
C++ has had designated initializers since c++20.
by patrick451 3y ago
C++ has had designated initializers since c++20.
- turndown 3y agoAny look into this will show that C's designated initializers are significantly more flexible/better in every way.
- SubjectToChange 3y agoIt’s amusing to me that whenever C has a feature that C++ doesn’t, C programmers hammer on the usefulness and power of said feature, but on the converse those same C programmers hammer on the divine simplicity of C. C++ has constructors, it doesn’t really need designated initializers in the first place. They were added primarily for C compatibility.
- kaashif 3y agoPoint taken, I was inaccurate. Out of order designated initializers still don't work in C++20, right? Which still means C++ isn't a superset of C.