Live data from Hacker News

Show HN: Beautiful Type Erasure with C++26 Reflection

ryanjk5.github.io

41–50 of 64 posts

Re: Show HN: Beautiful Type Erasure with C++26 Reflection

#41
post #18

Earlier quoted context omitted.

I don’t really like much about C++ anymore, but I still enjoy reading C++ articles and listening to C++ podcasts, and I would consider it beautiful. Oftentimes the things I dislike about it are also the beautiful things. The term “beautiful mess” seems appropriate. It’s a bit like a well-kept Victorian home. The amount of work, money, and dealing with discomfort that goes into maintaining one isn’t something I really…

> 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 :)

Think of it like a rainforest ecosystem. Very complex and tangled, even fragile. But it’s the tangled fragile complexity that makes it interesting.

Re: Show HN: Beautiful Type Erasure with C++26 Reflection

#42
post #6

Reflections, especially static ones, are horrible for debugging.

I get a heart attack whenever I have to view core file from a decently complicated C++ program. The amount of template-in-a-template-in-a-template...(and this continues for some time) is not so readable to me. Maybe it is just me.

Re: Show HN: Beautiful Type Erasure with C++26 Reflection

#43
> 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

Re: Show HN: Beautiful Type Erasure with C++26 Reflection

#44
post #43

> 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

You mean "used void* and wrote lots and lots of linter suppression comments" because it's fundamentally amateurish to write C++ without at least clang-tidy, cppcheck, and a couple others.

Re: Show HN: Beautiful Type Erasure with C++26 Reflection

#47

Earlier quoted context omitted.

That is exactly what I was thinking. I was a seasoned C++ programmer and always loved reading articles like this. I can't imagine I will every write my own C++ code again -- or in any language. I now program with English specifications now and I am 10000% times more productive.

I could imagine that in near future when token prices are as high as they really are, programmers that can't imagine or remember how to write code anymore will clean our streets, drive our taxis and water our plants.

It will be easier than trying to learn to the new features of C++34.
Post reply on HN