[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Strict typing and Lua [Forked From: Re: Are automatic coercions ever going away?]
- From: Andrew Starks <andrew.starks@...>
- Date: Fri, 1 Aug 2014 16:35:09 -0500
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