lua-users home
lua-l archive

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


In message <532D932B.5000205@erix.it>
          Enrico Colombini <erix@erix.it> wrote:

> On 22/03/2014 14.09, Egor Skriptunoff wrote:
>> Does it mean the following:
>> assert(4.5//1.5 == 4)
>> I was expecting 3 as the result of 4.5//1.5

> At first glance, yes. But that would be a fp division followed by
> rounding to the nearest integer, which would defeat the purpose of
> integer division.

I still regard coercions between number types as evil.
"O Lord give us strong typing, but not yet" seems to be the
message.

-- 
Gavin Wraith