Hacker News new | past | comments | ask | show | jobs | submit login

Designated initializers. It's in C99.




Yes it's strange, it's one of the reason I stopped using C++ as a matter of fact. Given the innate amount of code required in C++ constructor to initialize objects, you'd think that would be very handy.

BTW, shameless plug, but my own simavr uses these C99 features as more or less the whole basic structure on how multiple cores are described, see a sample core declaration [0] for example. The beauty is that there is no code involved in the declaration, it'll be 'const' too. Imagine the boilerplate you'd need to do that in C++!

[0]: https://github.com/buserror/simavr/blob/master/simavr/cores/...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: