So, since you are not rewriting everything for me [smile], as I write
new classes is there a reason I should or should not use NATURALs
where in the past it would have been INTEGER?
--- In eiffel_software%40yahoogroups.com">eiffel_software
yahoogroups.com, "Emmanuel Stapf [ES]"
<manus
...> wrote:
>
> > This also got me thinking about HASH_TABLE and
HASH_TABLE.hash_code.
> > Theorectically, could these be NATURALs instead of INTEGERs?
>
> Yes.
>
> > What am I missing here? Is there a reason a new class should
> > not use NATURAL_xx in place of INTEGER for features such as
> > `count', `max_items', etc.?
>
> Yes, if we were to rewrite everything from scratch, we would
definitely use
> NATURAL since they provide 2 major benefits:
> - no need for assertions of the type `x >= 0'
> - containers can now hold twice as much items as before (4G instead
of 2G).
>
> Manu
>
.