lua-users home
lua-l archive

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


Did anybody think about using the [] operator for pushing new elements at the end of array? In PHP we can write:

$table = array();
$table[] = 'elem1';
$table[] = 'elem2';

In Lua we must use ugly table.insert() function. It's to much typing - maybe somebody implement this syntax for convenience?

--
Regards,
Adam Dziendziel