Data.Fixed.Fixed constructor

Jules Bean jules at jellybean.co.uk
Mon Jul 27 11:32:48 EDT 2009


Ashley Yakeley wrote:
> 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).

I disagree with you entirely and completely.

I've made my argument and there is nothing more to add. You can ignore 
it if you wish.

The whole point of SYB is not to break abstraction.

A Data instance for Data.Fixed which exposes the Integer inside would 
render it useless for the kind of things I expect people do with SYB.

Jules



More information about the Libraries mailing list