lua-users home
lua-l archive

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


On Thu, 24 Dec 2020 at 22:23, frank@kastenholz.org <frank@kastenholz.org> wrote:
>
>
> The Principle of Least Astonishment leads one to the position that type() ought not change in a way that is not backwardly compatible. One could make “newtype()” or, perhaps, have type() return two values (one of the existing values plus, optionally,  the __name field from the meta table)
>
> That said, I do like the idea in principle & have done hacks similar to those described
>

In Ravi I added a new function that does this. I agree that leaving
the current type() function unchanged is better.

Regards