lua-users home
lua-l archive

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


Am 29.04.2014 11:39 schröbte Dirk Laurie:
On Apr 28, 2014, at 7:14 AM, Leo Razoumov <slonik.az@gmail.com> wrote:
I think that the "principle of least surprise" would favor 2^-3 == 0.125

There are many existing Lua programs that do this. This is the status quo.

I'm not sure you replied to me, but this is exactly what I proposed: let ^ always return floats, no error on negative exponents, no wrap-around for large numbers. Any new behavior can be put somewhere else ...


To change it requires an argument demonstrating that more practical
advantage is to be gained from the change than the damage caused by
breaking those programs.

Practical, not theoretical or hypothetical. Extra computing power,
not extra hair-splitting ability.

That argument has not yet been made in this thread.


There have been lots of arguments in this thread. The problem is that none of the proposals so far are best in all of consistency, usefulness, speed, expected behavior, _and_ backwards compatibility. So it's basically a judgment call about what you value most and how much the other categories suffer ...


Philipp