3 ms·
Just about every non-c++ implementation depends on reflection or compile time introspection. Neither of which are in C++. So people endlessly reinvent the whe
by DrBazza 4y ago
Just about every non-c++ implementation depends on reflection or compile time introspection. Neither of which are in C++. So people endlessly reinvent the wheel.
- bluGill 4y agoreflection is one of the C++'s committee's highest priority as they recognize it will solve a lot of problems people have. However they also know that details matter and so they need more time to get it right. C++ has more than enough cruft that doesn't quite fit together, there is no interest in adding more.
- DrBazza 4y agoIndeed. I first wrote an enum-to-string macro back in the late 80s in C, and again in the late 90s for C++. And here we are in 2022... still writing enum-to-string macros and the like.
- shultays 4y agoenum-to-string should be part of CS curriculum, instead of linked lists. looks how many times people needs it!
- bluGill 4y agoI've needed linked list more often than enum to string over my 20+ years in industry. (both combined is less than a handful) This is mostly about what problems I've had to work on. I think linked list taught me more useful skills than enum to string, even though I had to figure out the later on my own. Which is the important part of education, does learning things directly or indirectly help you more in the long run.