GianLuigi Piacentini
2015-01-04 22:35:02 UTC
or same type and (sometimes) different handling logic ?
I coded a module handling with parametric straight lines in the space, then
noticed that segments will practically be same code, with some exceptions.
So
- same type, sometimes different handling logic ?
- 2 types, lot of duplicate code ? (are they really different ? is it worth
to reflect logic difference into the type system ?)
- inheritance ?
What do you suggest about ?
Thanks in advance, happy new year to everybody.
Gigi
I coded a module handling with parametric straight lines in the space, then
noticed that segments will practically be same code, with some exceptions.
So
- same type, sometimes different handling logic ?
- 2 types, lot of duplicate code ? (are they really different ? is it worth
to reflect logic difference into the type system ?)
- inheritance ?
What do you suggest about ?
Thanks in advance, happy new year to everybody.
Gigi