Hacker News new | ask | show | jobs
by axilmar 1199 days ago
In C++, you can have clean code and performance, by utilizing templates.

In the example given, all polymorphism can be removed, and the shapes can be stored in std::tuple structure.

And then the operations would be faster than C, since no switch statement would be needed.

1 comments

then your compile times balloon even larger than they already are in C++