lua-users home
lua-l archive

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


I'm curious what features people would like to see added to Lua.
Generally I'm content with the way things are. But there are some
things...

I'd like to see some sort of "default" value for function arguments
added. Something along the lines of:

function foo(a or 5)
  ...
end;

I wouldn't be very afraid of problems from passing nil or false to
such a function, as you wouldn't have a default value if you might
expect that as an argument. Yes I realize you can just have: function
foo(a or 5) a = a or 5; ... end;. Syntactic sugar maybe?

I'd like to see some sort of table.hole value for table arrays. I know
this has been talked about a lot.

What features would you like to see added?

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant