[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How about removing the underscores from metatables?
- From: Axel Kittenberger <axkibe@...>
- Date: Thu, 27 Jan 2011 11:13:52 +0100
Code using metatables looks freighting, major reason are the
underscores. In C underscores usually highlight "compiler specific
extension" or "dirty hack using clib internals", where this scary look
is well justified. Metatables are a seperate namespace from the table,
so what should the underscores protect against? Sure there are those
hacks, where a table is a metatable to itself, but when you expect
"index" or so to be normal keys for that table, just dont do that kind
of hack. Wouldn't code be shorter and better looking without __ for
any content of metatables? My guess that newbies are so freightened
from metas is just exactly the __syntax.