<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 12, 2019 at 6:04 AM David Rector <<a href="mailto:davrec@gmail.com">davrec@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>Fair enough. </div><div><br></div><div>As I say in my readme, I recommend those who need full reflection facilities — up to their class templates, down to the individual IfStmts etc. in their function defs — to use my implementation and simply isolate dependencies on future standards into their own helper functions. You can do everything now! No need to complain to or pressure Andrew (who has done some extraordinary work by the way) about what isn’t yet reflected.</div><div><br></div><div>*Eventually* the standard will support reflecting everything, years hence, whatever anyone says now. The demands will just never stop until everything is reflected.</div></div></blockquote><div><br></div><div>Not all demands must be satisfied. Other languages (I'm looking at Java) have reflection without expression reflection, for example, so far as I know.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div> Start writing your algorithms now, switch your helper functions to whatever standards they decide later.</div><div><br></div>Regarding parallel naming I think we’re talking about different things — what we’re doing now IS a parallel naming structure. meta::is_constexpr(reflinfo) is a parallel of FunctionDecl::isConstexpr() etc. A full parallel structure of every property is what we’re looking at building. If everyone’s looked hard at that eventuality and are okay with maintaining that, then I suppose I have no cause to complain — maybe it’s not as hard as I imagine.<div><br></div><div><br><div><br><blockquote type="cite"><div>On Nov 12, 2019, at 8:01 AM, Andrew Sutton <<a href="mailto:asutton.list@gmail.com" target="_blank">asutton.list@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>I argue the standards should be based on the clang AST. Clean it up first of course — and yes that alone would be extraordinarily difficult. But it’s also very difficult to build a gigantic parallel naming system for reflection properties. And then to maintain it long term…<div><br><div>Best to look hard at what lies ahead, and bite the bullet now. Clean up the AST, define the standard via it. (And c’mon we all know those AST nodes have a lot of flab to go with all their muscle; clang would benefit too after we all finish grumbling about the changes.) Other compilers can do a parallel naming system or adjust their own ASTs to match clang’s naming system — doesn’t need to add any work for them.</div></div></div></blockquote><div><br></div><div>This is a non-starter for standardization. There are significant and generally incompatible differences in the internal representations of C++ among the different vendors and no will to standardize or even informally adopt a common representation. Even if there were interest in doing so, the engineering cost would be prohibitive, as it would essentially require gutting and rewriting huge swaths of the compiler (and in GCC's case, possibly the middle-end). Parallel naming is also unlikely because of memory requirements.</div><div><br></div><div>You have the same problem with compiled module interfaces, which serialize the internal representation.</div><div><br></div><div>Andrew</div></div></div>
</div></blockquote></div><br></div></div></blockquote></div></div>