[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua minus null (-0)
- From: GrayFace <sergroj@...>
- Date: Mon, 06 Jun 2011 11:11:46 +0700
On 06.06.2011 9:41, HyperHacker wrote:
It is a bit strange, but I don't see the harm in showing a meaningless
minus sign? The alternative would be modifying tostring to do an
additional check, and that has its own issues: adding code to "fix" a
harmless "bug", not "fixing" it completely (what about string.format
and other places a -0 could sneak through?) causing inconsistency,
formatting (how to display -0.0000000000001?), and people inevitably
complaining when it *doesn't* show -0, to name a few.
Some additional code for tostring, string.format and other such places
won't cause a slowdown.
I'm pretty sure -0.0000000000001 would be better displayed as 0 rather
then -0 for tasks Lua is used for. There are people who need -0 in C,
but I doubt there's a single person who needs it in Lua.
--
Best regards,
Sergey Rozhenko mailto:sergroj@mail.ru