5 ms·
Reflections alone would be one of the most impactful additions. And in contrast to most others: very difficult to do otherwise. I'm a bit surprised by the sudde
by harrid 3y ago
Reflections alone would be one of the most impactful additions. And in contrast to most others: very difficult to do otherwise. I'm a bit surprised by the sudden push after long phase where it seemed like they would never come.
Contacts: yes please. Variadic indexing is one of those things everyone writes their own helper for. But this standard facility is very welcome indeed.
Some additions seem a bit of of scope for the standard of a language that famously refuses to fix mistakes. So in weary about std::hive, networking, physical units.
And an underrated cherry is at the end: cleaning up those "ill formed, no diagnostic required" clauses in the standard. For those who don't know: there are things forbidden in the standard which the compiler is allowed to not tell you (because it's difficult for the compiler to prove it). In particular this is omnipresent in the constexpr world. Leading to silly redundant code that manually assets things to explicitly trigger the compiler to check for errors.
- pjmlp 3y agoApparently someone showed up to pick up the work regarding reflection. However at least we already have a kind of poor man's reflection, with constexpr if + concepts + type traits. As for the rest, I am also not a big fan, but until my favourite language runtimes and GPGPU tools switch to something else, C++ is part of the toolbox. No need to add even more layers.
- SubjectToChange 3y agoReflection will be a welcome addition whenever it arrives. On the other hand, whatever is standardize will be a profound disappointment compared to Circle C++.
- jcelerier 3y agoboost::pfr is also huge for reflection in C++. It leverages corner cases of the language and compilers but does so uniformly (works for MSVC, GCC, clang which is all that matters in 2023). It allowed me to write for instance https://GitHub.com/celtera/avendish https://GitHub.com/celtera/avendish which keeps on giving. The last version even add automatic field name reflection which is huge: https://www.boost.org/doc/libs/master/doc/html/boost_pfr/tutorial.html#boost_pfr.tutorial.reflection_of_field_name https://www.boost.org/doc/libs/master/doc/html/boost_pfr/tut...
- pjmlp 3y agoThanks for the hint, wasn't aware of it.
- spacechild1 3y agoWow, how does this even work? Can you share some hints?
- jcelerier 3y agohttps://www.reddit.com/r/cpp/comments/17rnuh6/comment/k8srx55/ https://www.reddit.com/r/cpp/comments/17rnuh6/comment/k8srx5...