Hacker News new | ask | show | jobs
by rwmj 5 days ago
Don't C++ designated initializers require you to initialize in struct order? That makes them kind of annoying to use.
2 comments

IMO it renders them kind of pointless, as you can then just leave out the field names (keywords, in pythonese) and get the same effect. It's very disappointing that they're naught but comments without the punctuation.
You can disable the lint for this if you don’t use constructors/destructors in your project or if you are sure you won’t do funky stuff in the struct initializer afaik