News for hackers. Stuff that matters.
Re:Type Erasure in C++ Explained by AlexanderDhoore on Thursday April 15, 2021 @12:35PM (#26822729)
"Well, let's just add another level of indirection."

Modern software development in a nutshell.

Re:Type Erasure in C++ Explained by winstonchecksin on Thursday April 15, 2021 @01:29PM (#26823550)
Modern software development is a convoluted mess of poor abstractions, new frameworks and flavors of the week, and essentially a million different ways of solving the same problem.

I work with some of the most brilliant people in the world (in my opinion) and the problems we are working on are how to grab peoples attention and show them relevant ads. And we don’t call them “ads” but recommendations.

Sorry I’m working right now and wondering what I’m doing with my life.

Re:Type Erasure in C++ Explained by slver on Thursday April 15, 2021 @01:22PM (#26823459)
Indirection is the price of scale. As a system grows, you need breaking points, boundaries. These often result in adding one more level of indirection.

But we're also moving in the other direction, for example Java is introducing value types ("inline classes") and low-level memory allocation/manipulation APIs. That's a big step for a language that started with the idea of everything is an object (and an object is an indirection).

Re:Type Erasure in C++ Explained by rwoerz on Thursday April 15, 2021 @03:13PM (#26824915)
I would call indirection the price for abstraction.
Re:Type Erasure in C++ Explained by ChrisSD on Thursday April 15, 2021 @02:13PM (#26824179)
Nothing modern about it. This is basically the C philosophy in a nutshell. Assuming "indirection" means "pointer indirection".