lua-users home
lua-l archive

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


On Mon, Jun 19, 2017 at 10:35 PM, Coda Highland <chighland@gmail.com> wrote:
> (1) Lua is already strongly typed. It just has a very small list of
> recognized types, and one of those types is "table".

It could be argued that Python tends to be more strongly-typed, since
we have the happy habit of passing plain tables with implicit
(hopefully documented) structure, rather than a _distinct_ type.  So
API contracts tend to be looser.

> (2) Stronger typing than this would not simplify the language
> whatsoever. It would require a mechanism by which user-defined types
> can be added as well as mechanisms by which these types can be
> identified, manipulated, and instantiated.

We do have conventions, although as the late great Grace Hopper said,
"The wonderful thing about standards is that there's so many to choose
from".

We cannot however do things like define our own strings (the so-called
'virtualization' problem)