lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Jun 12, 2014, at 4:59 PM, Coda Highland <chighland@gmail.com> wrote:
>> 
>> It’s less “ints behave like C” than “ints follow the behavior of the underlying hardware”, which these days almost always means 2’s complement with overflow. I’m really not too sure clamping is better than overflow .. at least with overflow when it happens it’s (usually) pretty obvious; clamping has greater potential to go undetected. (Case in point: at Chernobyl they initially thought radiation was much lower because some of the radiation meters clamped at their maximum level).
>> 
>> —Tim
> 
> It says it throws an error. That's not clamping, and it will notify
> the developer that it's happened.
> 
> /s/ Adam
> 

I’d missed that till I got to that part of the language manual just AFTER writing this email. Doh! :)

—Tim