lua-users home
lua-l archive

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


Can you elaborate regardless? It introduces 1 more type, removes the vararg type and some functions that deals with var args. The end result are less lua functions and fewer exceptions to remember.

In a way we have 2 fundamental types already. The entire table library assumes that the table passed is treated as an array type. This separation has grown more since table.pack and table.unpack was introduced. Ipairs work on arrays and pairs work on everything else, now there're only pairs.

For those of us who have used Lua for a long time and understand the differences between arrays and tables, a change like this is something new we would have to learn. So in that sense not changing anything is more simple than learning something new. Is that what you mean?

Maybe I should have used a different subject in the email. I honestly don't expect this to be implemented in Lua, but I would definitely be interested in a change like this. I'm also wondering if for instance the introduction of [] as a constructor would cause issues with other syntax (backwards compatibility aside) or if these changes could make the C implementation more difficult.


On Fri, Jan 19, 2018 at 12:50 PM, KHMan <keinhong@gmail.com> wrote:
On 1/19/2018 6:26 PM, Elias Hogstvedt wrote:
Lua was my first language and the language I've been using the most for 10~ years. I want to point this out becuase I don't want to be the guy who's coming from X language that want changes in Lua because it's different from his favorite language. I'm not really expecting any change but it's fun to think about language design and I'm looking for feedback.

[snip snip snip]

I believe this would simplify and make the language easier to understand.

'Simplify'.

Really?

(That's all I'm going to say, ha ha. :-p I'll leave it to others to argue it out.)

--
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia