[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Re: OOBit
- From: Nilson <nilson.brazil@...>
- Date: Wed, 29 Sep 2010 10:57:04 -0300
On Wed, Sep 29, 2010 at 5:03 AM, Gunnar Zötl <email@example.com> wrote:
> it is not so much about what I can do, but more about what kind of code I will find. As I said before, I consider the lack of builtin magic behaviour (apart from the meta-stuff, which allows for some weird stuff) in lua a boon. And I honestly don't see what the fuss is about with the colons and all...
First, thanks for your post.
Why do you think that time to time people suggest a colon eliminate solution?
IMHO, for some Lua's users, the colon seems to be like a column in the
middle of a passage in a house. They understant why the architect put
it there, although it seems a little strange. But as the people are
adaptable and love Lua's elegant power and features, while the time
goes on, the colon (the column in the middle of passage) becomes a
natural thing. And if you give enough time, you can even heard: Why
the other languages do not have a colon?
Ahhnn, the magic behavior would be optional. If you don't like it,
just don´t use it.
>> that seems to be, for the OO paradigm as the "goto" was for the
>> structured programing. So, as in PASCAL and C the goto still exists,
>> the classical way should continue to address this kind of requirement
>> - but, like the goto - should be used with caution.
> well, for one, lua is not an OO language. And I would not want it to become one. Neither do, from what I gather, the authors. And, as Javier mentioned, these dotty thingy discussions die down rather quickly, so I don't really see a strong interest for this in the lua community either.
I agree that Lua is not a "out of the box" OO language, but has
features that, among other things, intend to allow a very flexible OO
behavior/implementation using it. The OO thing seems to be so
important that PiL has a whole chapter about it and Lua itself has the
* simulates a kind of method definition
* simulates the "OO style call"
* improves performance eliminating an extra "push" - OP_SELF.
With colon, the OO style is not usual and requires a little extra
mental effort to use (dot or colon?), although is elegantly logic.
The patch's idea was to take a little step further, improving the
Lua's OO simulation with an OObit. The patch puts a internal mark on
functions and SELF parameter, which gives a certain "consciousness" to
LVM that is happening a "table call. What to do with it?
> So I don't think your proposal is going to make it into the main lua codebase, and as far as I am concerned, that is a good thing.
I don't know the future of the patch - I already request comments
about it. (This is a cue to someone be rude - please don´t).
> Nonetheless, make it a lua power patch and put it on the wiki next to the other dotty things, and it will probably find its users.
I am newbie here. If you read my previous messages, you will see that
I was asking for comments about the patch before I write it. I
thought that I could use this mailing list with this purpose, am I
By the way:
* The OOBit patch brought me the idea of the CONST patch (70% done -
* To efficiently implement the CONST patch, I accidentally made a ***
LVM optimization *** that reduced up to 4-5% (measured in a x86
computer with MSVC) the "interpretation time" of some sort of Lua's
programs (full of OP_SETTABLE instructions). I don't know if this
optimization will be efficient in any platform and I cannot do the
tests by myself - help needed.
* a LVM optimization that makes Lua even faster is a good thing for
everyone, isn´t it?
IMHO, we never know where good will and hard work can lead. Why not be
generously patient if you don't feel a uncontrollable desire to help?