[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Constants in Lua 5
- From: "Bilyk, Alex" <ABilyk@...>
- Date: Thu, 16 Jan 2003 15:38:57 -0800
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.
From: jimmyp_gr <firstname.lastname@example.org> [mailto:email@example.com]
Sent: Thursday, January 16, 2003 1:46 PM
To: Multiple recipients of list
Subject: Re: Constants in Lua 5
you might want to take a look at my recent thread "Interfacing lua
with C" for some somilar tagmethod vs metamethod trouble.