lua-users home
lua-l archive

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


Asko Kauppi wrote:
I wasn't referring so much to 'string.gsub' but the fact that sometimes a functions return values are passed all, sometimes only one. I do _know_ how it goes, and so forth, but it certainly is a trap for newcomers.

Should we do a "Common Lua Pitfalls" :) list somewhere (the wiki?). That could help, since I don't have a better overall solution to recommend either.

That's a good idea.

There is is multiple return values thingy, and a lot of things that could bite programmers coming from another language (habits are hard to forget), like syntax:

if (condition) then

and so on.

The Wiki allows incremental update of this list, so it is a good place.
The page address should be in the FAQ, I think.

--
Philippe Lhoste
--  (near) Paris -- France
--  Professional programmer and amateur artist
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --