On 3/12/10 2:50 PM, Herbert Duerr wrote:
your suggestion shows the fundamental flaw I've pointed out earlier
- that too much of the code makes implicit assumptions about the
available int ranges. Just grep for 0xFFFF, 0xFFFE etc. and weep.

The hardcoded range-checks were probably good enough then because of the
hardcoded types implied they would be safe forever. Changing any of
these signatures now is a lot of work with "lots of pain, little gain".
That's why it isn't high on anybodies priority list.

+1

Add to that performance implications - the Calc guys can likely tell
the story much better than me, how 'simple' increases in row/column
sizes affect overall speed.

Scalability problems are a different story. They show the same whether
allowing 64K instead of 32K or whether allowing 96K instead of 64K.

+1

Whether an index number is stored in int or sal_uInt16 has nothing at all to do with the performance of calc.

Of course changing old assumptions about reasonable ranges is hard as we
can see in the Calc's row and column limits, on Writer's paragraph
sizes, the number of resource IDs, etc. Nevertheless these limits should
not stay there forever.

+1

While I'm on the topic of exact-width integer types: Shouldn't we use
the types from <cstdint> instead? Is there any value-add left in the
sal_Int/USHORT/ULONG/etc. types, except as a marker that the code hasn't
been touched for a while?

Or should they get some value-add by e.g. in debug mode by them becoming
smart classes? With range checks, signed-unsigned checks, cast-checks,
etc.? Range checks should be simple. Maybe there is already a generic
template library for this? I haven't seen one though. If I had to
implement it I'd use type names close to the cstdint typenames and
switch the namespace depending on debug-mode or product-mode.

+1

To this whole thread I can only say: don't we have more pressing problems than to change perfectly valid code to other perfectly valid code which in the best case does the same as before.

Just my 2 cents, pl

--
"If the designers of X-window built cars, there would be no fewer than five
 steering wheels hidden about the cockpit, none of which followed the same
 principles -- but you'd be able to shift gears with your car stereo.
 Useful feature, that."
                -- From the programming notebooks of a heretic, 1990.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to