[Hugs-bugs] Re: Enum Int problem

Alastair Reid alastair at reid-consulting-uk.ltd.uk
Wed Aug 18 18:26:22 EDT 2004


> It seems to me that it is worthwhile to fix [problems caused by overflow]

But what's the point?

If your code is going that close to the limits, it is already non-portable.

If you really do need to go that close to the limits, use a datatype whose 
behaviour is precisely specified and portable like Int32 or use one with no 
overflow issues like Integer.  Int is the wrong tool for the job so it's no 
wonder it does badly. 

--
Alastair Reid


More information about the Hugs-Bugs mailing list