[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: number parsing question
- From: HyperHacker <hyperhacker@...>
- Date: Fri, 30 Apr 2010 07:46:44 -0600
I had the same thought just yesterday. It's nice in C to be able to
define coordinates like this for example:
//X, Y, Z
{+1.0, 0.0, -1.0},
{-1.0, 0.0, +1.0},
{+1.0, 0.0, -1.0}
However, there's not really much advantage versus leading positive
numbers with a space. Lua is meant to be simple and efficient, which
means generally not having unnecessary syntax such as this. I wouldn't
mind it being implemented, but I'd probably never use it.
On Fri, Apr 30, 2010 at 07:41, Benoit Germain <bgermain@ubisoft.fr> wrote:
>> De : lua-bounces@bazar2.conectiva.com.br [mailto:lua-
>> bounces@bazar2.conectiva.com.br] De la part de Dirk Feytons
>>
>> I guess neither, since Lua doesn't have a unary plus operator :)
>> See http://www.lua.org/manual/5.1/manual.html#8
>>
>>
>
> But in that situation, isn't '-' part of the Number terminal? I don't think it is handled as an unary minus opcode applied on the absolute value described by the following digits. Therefore, couldn't '+' be supported in the Number terminal parsing in the same fashion?
>
--
Sent from my toaster.