lua-users home
lua-l archive

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


On Fri, Aug 1, 2014 at 3:52 PM, William Ahern
<william@25thandclement.com> wrote:
> I feel like the obsession with stricter typing is turning into an
> anti-pattern.


This is a good point, and i think the obsession has legitimate roots.
Lua's type system is nicely defined, unevenly used (although more
evenly with 5.3) and not quite robust enough to do some things that
you may want.

For example, if you really want duck-typing, it's not easy to do,
because not everything is cool with a string / number like table.

The dynamic programming rule that says that you shouldn't check for
type doesn't apply as much as it otherwise would. And so 'type' is a
bit weird in Lua.

--Andrew