I use C++ every day and this feels like an entirely different language and philosophy. I know this is the reality of C++, but I never go searching for it so when it pops up randomly my jaw drops a little.
Show HN: Beautiful Type Erasure with C++26 Reflection
61–64 of 64 posts
Re: Show HN: Beautiful Type Erasure with C++26 Reflection
#62Reflections, especially static ones, are horrible for debugging.
Re: Show HN: Beautiful Type Erasure with C++26 Reflection
#63Earlier quoted context omitted.
> I would consider it beautiful. If there's something that C++ actually lacks, that's the elegance, grace and beauty. The rest, it's all already there or will be there shortly :)
The problem with that is best described by Antoine de Sain-Exupery's saying "perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." I guess the same goes for elegance and grace...
Re: Show HN: Beautiful Type Erasure with C++26 Reflection
#64> If you’ve ever tried using type erasure for something more complicated than std::any or std::function, you’ve either written 100+ lines of easy-to-mess-up code or reached for a boilerplate-heavy library like Boost.TypeErasure or Folly.Poly Or you just used void* and went on with your life