2 ms·
You're using "reuse" in a paritucularly narrow sense to mean "usable across the local language's natural type spectrum". And yes, getting that (ahem) "right" i
by ajross 8y ago
You're using "reuse" in a paritucularly narrow sense to mean "usable across the local language's natural type spectrum". And yes, getting that (ahem) "right" is a huge honking pain without careful attention to subtype variance. It's just that you view that as a feature to solve a problem and I view it as a symptom of having tried to solve the wrong problem[1] in the first place.
There are lots of ways to have perfectly "reusable" code that doesn't involve subtyping.
[1] Because let's be honest: modern "library" code consists of maybe 72% of effort expended on solving the wrong problem.
- rocqua 8y agoI was mostly thinking of e.g. the C++ Standard library, or a TCP library, or a multithreading framework. And really, by re-using that code I mean using the library. Now, most `libraries` don't fall under this category. But for libraries that are truly going to be used, especially if they are used in multiple different organizations, separate from the library writers, then this matters. To your point though, these library writers aren't delivering a what a lot of people think of as a `software product`. I would call it more of an intermediate-product than an end-product.