News for hackers. Stuff that matters.
Re:Plywood: A New Cross-Platform Open Source C++ Framework by pjmlp on Tuesday May 26, 2020 @10:51AM (#23311875)
We can anyway generate the runtime one at compile time, that is how many Java and .NET compiler plugins and annotation processors work.
Re:Plywood: A New Cross-Platform Open Source C++ Framework by jfkebwjsbx on Tuesday May 26, 2020 @11:06AM (#23312078)
Exactly, with a compile-time one it would be relatively easy to build portable runtime reflection frameworks/libs, for those that really need it.

Otherwise it would be a feature like RTTI that everyone "hates" if enabled by default.

Re:Plywood: A New Cross-Platform Open Source C++ Framework by preshing on Tuesday May 26, 2020 @11:42AM (#23312515)
This might come true some day, but it seems not in C++20 and in recent static reflection proposals there was no way to distinguish reflected from non-reflected members in the same class.
Re:Plywood: A New Cross-Platform Open Source C++ Framework by pjmlp on Tuesday May 26, 2020 @12:43PM (#23313339)
Yep that is post C++20.

I am hardly a C++ user nowadays, but such stuff interests me, because the Windows Development team managed to push C++/WinRT as replacement for C++/CX, but are declining any improvement to Visual Studio support (at least comparable to C++/CX) until ISO C++ gets similar capabilities to C++/CX.

So given that some C++ usage is required depending on which APIs you want to access from .NET, you can imagine there are many WinDevs not very happy with the downgrade in tooling support.

Back to your point, in what cases might such distinction be relevant?

Re:Plywood: A New Cross-Platform Open Source C++ Framework by preshing on Tuesday May 26, 2020 @01:25PM (#23313903)
One example is in: https://github.com/arc80/plywood/blob/master/repos/plywood/s...

Here, only one data member is meant to be serialized. The others members are there to accelerate lookups into the first data member. (Full disclosure: that structure isn't actually serialized yet, but the Arc80 Engine which uses Plywood has similar examples.)

Re:Plywood: A New Cross-Platform Open Source C++ Framework by BruceEel on Tuesday May 26, 2020 @01:43PM (#23314147)
Interesting! Could sufficiently enhanced compile-time reflection (say we do get supercharged CT reflection in C++2b*) be used to implement fully transparent&automatic versioning in serialization frameworks? I know very little on this subject but I think boost serialization, though capable of handling multiple versions of a given class, requires manually 'tagging' source files as being say, version 1,2,etc.
Re:Plywood: A New Cross-Platform Open Source C++ Framework by pjmlp on Tuesday May 26, 2020 @01:46PM (#23314182)
Thanks!
Re:Plywood: A New Cross-Platform Open Source C++ Framework by gpderetta on Wednesday May 27, 2020 @06:42AM (#23321481)
I haven't looked at the C++ reflection proposal in a bit, but I think that attributes are reflected so you should be able to use your own attributes to mark non serializable objects