On Mon, Jan 29, 2018 at 12:32 PM, Grey Knight
<tinyplasticgreyknight@yahoo.com> wrote:
wouldn't be sure how to make it work when e.g. I have some table which I'm
treating as an object of a specific type. Maybe a __type metafield can
give a string name for its type.
It's a surprisingly tough problem. Because we use these implicit,
ad-hoc types - how to specify them so we don't lose all that wonderful
flexibility? I believe the TypedLua research project has some
interesting things to say about possible solutions. That's why I said
that Lua and Javascript tend to think alike, at least js before the
demands for class _syntax_ got overwhelming. In the case of Lua, there
is little agreement on how to _define_ 'classes', so some extra
annotation is needed - this is a `Cat`.