Talk:Metatables

Add topic
Active discussions

Metatables aren't needed for most scripting. This information is on Lua site if needed. Delete this page. --GoldenUrg 16:09, 1 May 2010 (UTC)

I believe it should stay. Even though it isn't necessary for most needs, I still use metatables quite often. Awhile back I used the information on the page, so I think it should stay. --Camoy
Ok, this page is not bad (it's written in a fairly simple style and has a couple of practical examples). Should have a better description (for answering the what is a metatable question) and a disclaimer that it's generally needed. --GoldenUrg 04:09, 2 May 2010 (UTC)

Page needs a bit of a rewrite

The information itself is decent for the most part, but it skips around a lot, it skips important stuff, then talks about them later, to the point where people who haven't used metatables before would probably have a hard time understanding this, even after reading through it a few times. Also, it checks for self[index] in the __index metamethod, where the precondition is that self[index] doesn't exist. I don't like that. I can draft a new version of this article, if anyone wants me to. --crazypotato4 00:20, 30 January 2012 (EST)

Good idea. Also, according to the Lua 5.1 Reference Manual, for comparison operators, metamethods are only used if both values are of the same type and have the same metamethod for comparison. Make sure to note that too.
30 January 2012
Alright, I finished a quick draft of a new version of this page (mostly just an edit of the old page because I'm lazy). Should I just put it up here as a new version of this page? --crazypotato4 01:14, 30 January 2012 (EST)
Yes, so we can see the changes.
30 January 2012
Return to "Metatables" page.