[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: metatable transmission
- From: spir <denis.spir@...>
- Date: Tue, 22 Dec 2009 20:32:05 +0100
steve donovan <email@example.com> dixit:
> On Tue, Dec 22, 2009 at 7:11 PM, Mark Hamburg <firstname.lastname@example.org> wrote:
> >(I'm less fond of the trick of having the __index entry in the metatable point back to the metatable. As far as I can see, all this does is save one table in the system and it does so at the expense of making all of the metamethods available for __index access.)
> I see the point (an extra table is nothing here) but why should one
> want to prevent the metamethods from being accessed from the object?
For me it's a semantic/clarity issue -- not a practicle one. What is pointed by __index should hold metamethods -- `e basta! There is certainly no issue to expect at having more stuff there (a whole class-like object, in fact), simply it's confusing. Maybe it's just me.
Once more, metatable complication. For once, I think the design used by python-and-the-like is better, for it's simpler and clearer.
la vita e estrany