4 ms·
The examples from the first article about code reuse demonstrates power of row polymorphism. But in a statically typed language that requires a rather advanced
by fpoling 6y ago
The examples from the first article about code reuse demonstrates power of row polymorphism. But in a statically typed language that requires a rather advanced type system that allows to declare explicitly or implicitly that code works for any struct that contains the given fields. In C++ one can use templates, but that trivially leads to unmaintainable code.