lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
>> Allowing int64- literals ("local v = 5ll or 5ull") and always (!!)
>> coercing *all* operands (and the result) to integer type would be
>> enough, and things would stay as clear and intuitive as they are
>
> I guess I did not understand your proposal. "always coercing *all*
> operands"? Always? all? Doesn't that mean that "5/2 == 2"?
>
> -- Roberto
>

Ugh, my bad- here is what I was intended to write:
    if at least one operand is an uint64 -> coerce every operand to
uint64, unsigned add (result is a uint64)
    else if at least one operand is an int64 -> coerce every operand
to int64, signed add (result is a int64)

My bad.

--Wolfgang