lua-users home
lua-l archive

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


I have been following it. I see the solution. Pretty darn slow and butt ugly but nevertheless. For what its worth, here's what I think
 
1. The loss of simple 'set'/'get' events for existing table-keys is a major flexibility/feature reduction in Lua 5 with respect to table events (not only for constants and/or C-bindings but a myriad of other useful applications). 
2. Meta-tables, although prettier than tags, are much slower performance wise. I will benchmark them both on a simple class system or something similar, but from what I see comparing implementations in 4 and 5 they may not even be in the same league with respect to performance (take a look at luaT_gettm in both versions - not funny (!)), at least under certain circumstances. Is there any principal difference, I failed to notice, that makes meta-tables a step more advanced a feature, not just a step prettier than, the tag system found in Lua 4? Tags were not pretty. Were they on par with meta-tables as a concept and implementation? I can't see why not! 

I like pretty code, who doesn't? But I certainly am not prepared to pay huge premiums for prettiness when it comes to software. After all, we are not talking about a beauty pageant, but rather about a tool that is supposed to gain more flexibility and usefulness from version to version, not to gain them in one place and drop them in another in what it seems to me like a totally arbitrary fashion.

AB

-----Original Message-----
From: jimmyp_gr <jimmyp@hal.csd.auth.gr> [mailto:jimmyp@hal.csd.auth.gr]
Sent: Thursday, January 16, 2003 1:46 PM
To: Multiple recipients of list
Subject: Re: Constants in Lua 5

Hi,

you might want to take a look at my recent thread "Interfacing lua
with C" for some somilar tagmethod vs metamethod trouble.

Dimitris