int/long unification hides bugs
aleaxit at yahoo.com
Mon Oct 25 23:33:35 CEST 2004
kartik <kartick_vaddadi at yahoo.com> wrote:
> there seems to be a serious problem with allowing numbers to grow in a
> nearly unbounded manner, as int/long unification does: it hides bugs.
So does allowing strings to be any length.
> most of the time, i expect my numbers to be small. 2**31 is good
> enough for most uses of variables, and when more is needed, 2**63
> should do most of the time.
Most of the time, I expect my strings to be short. 1000 characters is
good enough for most uses of strings, and when more is needed, a million
should do most of the time.
> granted, unification allows code to work for larger numbers than
> foreseen (as PEP 237 states) but i feel the potential for more
> undetected bugs outweighs this benefit.
Granted, unlimited string length allows code to work for longer strings
than foreseen (as common sense states) but (if you're consistent) you
feel the potential for more undetected bugs outweighs this benefit.
By this parallel, I intend to communicate that (and part of why) I
consider your observations to be totally without merit.
More information about the Python-list