lua-users home
lua-l archive

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

On Friday, January 19, 2018, 12:23:26 PM GMT, Elias Hogstvedt <> wrote:
> Yes it will break everything, so I don't really expect this to be
> implemented. Perhaps a new language?
> If you can imagine a new language or be okay with breaking changes, do you
> think these changes make sense?

Hi Elias,

I think that what you are looking for is a language with stronger typing than Lua has.  In such a language I think your expectations would be valid ones to have, it's just that Lua prefers to take a more "duck typing" approach to dealing with different interpretations of tables.

You mentioned the predominant "list" and "dictionary" interpretations of table, but we can also use them as objects, or classes, or even modules!

You should try some languages with stronger typing and see if they meet your needs well.