lua-users home
lua-l archive

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


Ben <thebassplayer@gmail.com> writes:
> The Lua Way seems very tied into "There Are 8 Types And Only 8 Types
> And Thou Shalt Have No Other Types Before Me (And You Can Fudge A
> Little With Tables Because I Am A Merciful Language)".  (I'm aware of
> the temerity of a newbie posting opinions of the Lua Way, but I
> believe it reasonable.)
...
> That is to say, I've only maybe wanted a "callable" interface once or
> twice, and I feel I can finangle around it now.

Actually I think you're simply mistaken about "the Lua Way" -- it's
quite common in real-world Lua code to make heavy use of non-table
indexable objects (usually userdata), or non-function callable objects.
One of Lua's strengths is its extreme malleability.

There certainly are likely be to be times when one really does want to
know about the true underling type of an object, but I think many uses
of the "type()" method are more accurately thought of as bugs.

-Miles

-- 
Quotation, n. The act of repeating erroneously the words of another. The words
erroneously repeated.