override toString() for a tuple?
Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 4 02:03:37 PDT 2014
On Wed, 04 Jun 2014 06:25:53 +0000
Steve D via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> You would think the promise of OO and Inheritance
> would make it easy and free us from hacks like this ;)
That would require using OO and inheritance, which has nothing to do with
Tuple. ;)
And actually, I find that I very rarely need inheritance. It's definitely the
right solution for some problems, but in the vast majority of cases, I find
that structs are a better solution - especially because they're far more
composable. OO is actually very bad for code reuse, because it's not
particularly composable at all.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list