lua-users home
lua-l archive

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


On 21 November 2012 11:55, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> Is it a goal to have this invariant?
>>
>>   For all numbers n1, n2:
>>   For all non-debug Lua expressions L:
>>       [[ function f(x,y) return L end ]]
>>   There do not exist integers i1==n1, i2==n2 such f(i1,i2)~=f(n1,n2)?
>
> Not in general. First, there may be overflows inside 'f'. Second, we
> probably will have a function like 'isfloat' (but it may be a debug
> function). Otherwise, I think (hope?) the answer is yes; that is what we
> want.
>
> -- Roberto
>

Why make it part of the debug interface? Why not instead have integers
return 'int' for the core function type?

-- Liam