
On Fri, 2009-07-24 at 12:13 +0100, Jules Bean wrote:
When this actually alters the integer inside my Micro, I'm going to be pretty surprised.
Or maybe I'm not that surprised, but the point is, it exposes the internals of Fixed. It's an abstraction hole.
The whole point of SYB is to break abstraction. A "subterm" is a rather vague concept, and it makes a rather arbitrary distinction between "loosely holding" the contained value (will be touched by 'everywhere') and "tightly using" it (won't be touched). Does Complex hold or use its real and imaginary parts? Does Ratio hold or use its numerator and denominator? In both cases, the whole means something more than the aggregate of its parts, but this is typically the case with data-types. If you want a data-type that means nothing more than "aggregate", us (,) tuples. Generally I recommend KYB if you care about abstraction, because YB is actually meaningful code that should not be Sd. -- Ashley Yakeley