lua-users home
lua-l archive

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


On 16/01/2008 00:38, Hisham wrote:
Perhaps because fun 3+4 would look ambiguous and error prone? Somehow,
the quotes *are* the delimiters of the function parameter, so they are
no ambiguous.

Well, then what about this:

string.lower "HELLO".."WORLD"

I reckon it is ambiguous, but still not much more than math.exp (3)*(4)

Personally, I was never used to the practice of putting a space before the parameters of a function, I do this only for keywords (if, while, for -- for languages using these parentheses, of course), and I routinely surround my operators with spaces.

So I would write:

string.lower"HELLO" .. "WORLD"
and
math.exp(3) * 4

which lowers the ambiguity.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --