From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-05-26 12:13:09
From: Maarten Kronenburg
> To my knowledge
(Aside: I think you mean by that "I am not aware of any evidence to
contradict the suggestion that ...". If that is what you mean, "As far
as I know ..." would be more idiomatic. Particularly as there is an
English idiom "To my *certain* knowledge" which means "I know with
absolute certainty that ...". N.B. Your English is already a whole
heap better than my Dutch!)
> the base type int does not
> have a +0 and a -0.
> So therefore I see no reason to specify this.
C++ can be implemented on a sign and magnitude machine (I believe there
are still some around). On such a machine an int can be either +0 and
-0. (However I'm pretty sure the standard requires that those two
values compare equal)
> Derivation is a part of C++, so in my opinion
> users must be able to derive from class integer
> to make an integer with special properties.
I think that would be a mistake.
> How would you explain to a user that whatever
> he/she does with integer, derivation is not an option,
> because the destructor does not happen to be virtual.
> This is what it boils down to in the end.
They should use containment.
> Once again I argue that an unsigned integer is an integer,
> and a modular integer is an integer.
> An unsigned int is actually a modular int with modulus 2^32.
Actually the modulus is not specified. It cannot be smaller than 2^32,
but it could be larger.
-- Martin Bonner Martin.Bonner_at_[hidden] Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 203894
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk