|
On 04/14/2014 10:19 AM, Justin Cormack wrote:
As soon as any static analizer hits a function call, it wont be able to decide this anyway.I agree with Roberto, consistent types is more important. If you cannot tell if something will return float or int you can then no longer reason about other stuff that depends on it. Anyone trying to do static analysis on Lua code will have a hard time too. Justin
The power operater can either be: float ^ float -> float int ^ int -> int or float ^ float -> float int ^ int -> number Where number is defined as (float | int).I am not conviced by either option. The most consistent IMO would be an additional ^^ (int exponent) operator, and apply the same rules for power as for division.
-- Thomas