3 ms·
Not sure I understand, since they're available in c++ designated initializes are one of the features I use most, to the point of making custom structs to pass t
by jcelerier 1y ago
Not sure I understand, since they're available in c++ designated initializes are one of the features I use most, to the point of making custom structs to pass the arguments if a type cannot be changed to be an aggregate. It makes a huge positive difference in readability and has helped me solve many subtle bugs ; and not initializing things in order will throw a warning so you catch it immediately in your ide
- o11c 1y agoThe problem is that there are a lot of APIs (even system and system-ish ones) that don't want to specify the order of their fields (or outright differ between platforms). Or that can't use a meaningful order due to ABI compatibility, yet the caller wants to pass fields in a meaningful order.
- jcelerier 1y agoplatform APIs like this are likely much less less than 1% of the things I call in my codebases. The few files i have open right now have absolutely no such call.