3 ms·
Am I crazy for thinking this is (mostly) useless? It feels like programming in the last five years has turned into a competition of who can make the most abstr
by jovial_cavalier 2y ago
Am I crazy for thinking this is (mostly) useless?
It feels like programming in the last five years has turned into a competition of who can make the most abstract meta programming patterns. I think if you find yourself making use of this feature, you’re probably in a deep hole of your own making.
What is an example of a useful function that takes an arbitrary number of arguments each of which has an arbitrary type that isn’t as trivial as the examples given in the article? For super trivial stuff this is useful, and if std used this under the hood to provide std::first_arg or something, that would make sense. But the absence of this language feature doesn’t really seem like it’s holding back 99.9% of users.
- foota 2y agoPeople writing generic libraries need this. As an example, I've seen it used a lot in anything related to logging and monitoring, since these generally need the ability to take arbitrary data types and work with them in different ways. The same is true for database APIs, etc.,.
- deleted 2y ago[deleted]
- HeliumHydride 2y agostd::print is one. You need variadic generics to make it work.