On 03/10/10 16:45, bjoern michaelsen - Sun Microsystems - Hamburg
Germany wrote:
On Wed, 10 Mar 2010 15:56:37 +0100
Stephan Bergmann <stephan.bergm...@sun.com> wrote:
Re wincing at obviousness of matching range: How is that any
different for plain int (with INT_MIN--INT_MAX range) vs., say,
sal_Int32 (with SAL_MIN_INT32--SAL_MAX_INT32 range)?
Because our interfaces consist of sal_* types and users of interfaces
might rely on the implicit guarantee that a component can handle the
full range of the type. Bugs because some code uses some odd 16 bit
integer internally are really annoying (and not as uncommon as one
might guess *cough* writer core *cough*). Of course, using sal_* types
internally does not solve the range problem (multiplying two sal_Int32
for example), but still ...
That is not the point here. (If the semantics of an internal variable
are affected by the semantics of some interface, you have to take that
into account when choosing the type of that variable, of course.) What
I was after is whether it can be more or less obvious that a variable of
type int is adequate to hold a specific set of potential values vs. that
a variable of type sal_Int32 is adequate to hold a (different) specific
set of potential values.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org