
Boost : 
From: Deane Yang (deane_yang_at_[hidden])
Date: 20061130 15:21:05
Martin Bonner wrote:
>> In my opinion software design is not mathematical proof that one
>> design is better than another, but there is the mathematical fact
>> that the set of unsigned integers is a subset of the integers, and
>> the set of modular integers is a subset of the integers.
>
>
> But your classes do not represent the SET of integers and the SET of
> modular integers. They represent the FIELDS (you include the operators
>  and the class wouldn't be much use if they didn't.
>
> The modular integers do NOT form a subfield of the integers, which is
> why you shouldn't use derivation to represent them.
>
As mathematician who also writes C++ code, I would like to concur with
both Martin's opinion and his rationale. I think he put it very well.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk