[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Implementing "super()" for classes
- From: spir ☣ <denis.spir@...>
- Date: Sat, 8 May 2010 20:13:51 +0200
On Sat, 8 May 2010 11:20:03 +0200
steve donovan <steve.j.donovan@gmail.com> wrote:
> > * That table definitions be executable blocks! (Inside its own scope.) So that one can refer to previously defined slots in further ones, or even to the table itself.
>
> This definitely makes some things easier, but it's a big change. It
> complicates the lookup rules, which are fairly simple in Lua. Try
> some big-scale C++ and see your brain using extra cycles trying to
> keep track of symbol lookup!
Hello Steve,
What I mean (already exchanged on the topic) is simply that the table be defined at start of its definition:
Pt = { -- here t already exists and is equal to {}
x = 1,
y = 2,
d = x+y, -- so, this is legal
__index = t -- and this, too ;-)
-- .......
}
Denis
________________________________
vit esse estrany ☣
spir.wikidot.com