Readit News logoReadit News
tw061023 commented on Ask HN: Have you ever regretted open-sourcing something?    · Posted by u/paulwilsonn
jart · 5 months ago
The world's most successful open source developer didn't converge on that communication style for no reason. I don't think I've seen a single person bring up the classism inherent in dictating gentlemanly manners. Part of what made open source unique is that people from all classes could participate, and working class people are not tuned to pick up on subtle communication the way the upper classes have been. Linus likes to communicate in a way that leaves no ambiguity about he feels, to people of any class background, or any level of English language proficiency. The tradeoff is it offends the sensibilities of highly domesticated elites.
tw061023 · 5 months ago
[flagged]
tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
comex · 5 months ago
You can write a parser for an IDL, but you can’t reasonably write a parser for C++. So you have to move the definition of whatever types of methods or fields you want to reflect on into the IDL, instead of defining them natively in C++. (Or worse, have separate definitions in both the IDL and C++.) Which tends to be cumbersome – especially if you want to define a lot of generic types (since then the code generator can’t statically determine the full list of types). It can work, but there’s a reason I rarely see anyone using this approach.
tw061023 · 5 months ago
Why would I want to write a C++ parser?

IDL/DDL is the source of truth, moving the type definitions there is the whole point. There is only one definition for each type, which is in the *DL, corresponding C++ headers are generated and everything is statically known.

tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
otabdeveloper4 · 5 months ago
Yeah, wait till you find out what's behind the curtain in your web engine and AI.

Hint: it's C++, and yes, it will eventually use stuff like std::meta heavily.

tw061023 · 5 months ago
If you would check my comments, you would see I am quite aware. And no, it will not, just like it was with streams, ranges and whatever else.
tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
pjmlp · 5 months ago
I bet CERN might eventually replace their Python based code generators with C++26 reflection.
tw061023 · 5 months ago
Which problem would this solve for them?
tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
birn559 · 5 months ago
My perception is that C++XY features are wildly used in general. Of course there are some nobody uses, but that's not generally true. So your basic assumption is wrong.

We are at C++20 and I wouldn't like to work for a company that uses an earlier standard.

tw061023 · 5 months ago
Well, either you carefully vet which C++ features you use and my assumption still stands, or you don't - in which case I would rather not like to work in your company.
tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
jandrewrogers · 5 months ago
Completely inadequate for many use cases. IDL/DDL is one of the least interesting things you could do with reflection in C++. You can already do a lot of that kind of thing with existing metaprogramming facilities.
tw061023 · 5 months ago
Which use cases? What exactly you can do with "existing metaprogramming facilities"?

Dead Comment

tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
d_tr · 5 months ago
Great. But you can do anything you want by generating code. Why not have a standard solution instead of everyone doing their own, possibly buggy thing complicating their build process even more?
tw061023 · 5 months ago
Reframe it as "you can do precisely what you need by generating code" and there is your answer.

Which is far better than to rely on a party which, as I said, has precisely nothing to do with what anyone needs. Which will inevitably produce solutions that can only partially (I am being generous here) be used in any particular situation.

As for "possibly buggy" - look, I can whip up a solid *DL parser complete with a C++ code generator in what, a week? And then polish it from that.

The committee will work for several years, settle on a barely working design, then it will take some years to land in major compilers, then it will turn out it is unusable because someone forgot a key API or it was unfeasible on VAX or something like that.

And my build process is not complicated, and never will be. It can always accomodate another step. Mainly because I don't use CMake.

tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
d_tr · 5 months ago
What's the solution that's been around for years?

> ... just like always with newer additions to the C++ standard.

This is objectively laughable.

tw061023 · 5 months ago
Whip up some kind of in-house IDL/DDL parser, codegen from that.

Which, precisely, additions do not fit my points?

tw061023 commented on C++26 Reflections adventures and compile-time UML   reachablecode.com/2025/07... · Posted by u/ibobev
matt123456789 · 5 months ago
Whenever I start to feel like a real programmer making games and webapps and AI-enhanced ETL pipelines, I inevitably come across the blog post of a C++ expert and reminded that I am basically playing with legos and play-doh.
tw061023 · 5 months ago
It's the other way around. You are the real programmer and the committee and the "modern C++" crowd are more interested playing with legos instead of shipping actual software.

No way anything std::meta gets into serious production; too flexible in some ways, too inflexible in others, too much unpredictability, too high impact on compilation times - just like always with newer additions to the C++ standard. It takes one look at coding standards of real-world projects to see how irrelevant this stuff is.

And like always, the problem std::meta is purported to solve has been solved for years.

u/tw061023

KarmaCake day63June 10, 2023View Original