lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo:
> It worries me that some people seem to have a negative impression of Lua 5
> so near to it being officially released. Someone even said that we have
> "seriously damaged Lua functionality"!

It's a PR problem. They need to know that Lua5 is not as different from Lua4
as it seems. They need to be reassured by having each change explained. For
example, lexical scoping looks (from the outside) like it would be much less
efficient than upvalues. An implementation description describing why it
isn't would be nice.

> Sure, Lua 5 is different from Lua 4. The metamethod scheme is not the same
> as the tagmethod scheme, but it is simpler and more flexible, even if
> sometimes you have to use proxy tables for doing some stuff that was easy
> in Lua 4. Lua 5 was the outcome of a long sequence of work versions of Lua
> 4.1 and has gone through alpha and now beta stages. I'd think major design
> flaws would be found by now :-(

Björn De Meyer:
> I think the problem is that these new features are not well documented.
> lua_boxpointer()/lua_unboxpointer() is a good API, however, it's currently
> only documented here in the newsgroup.

I agree. I feel there are a reasonable number of Lua users (probably the
majority) that may be wanting to try Lua4's soon-to-be replacement Lua5
without being active members of the mailing list. They've missed months
(years?) of discussion and are seeing the "new way" for the first time from
a purely Lua4 perspective.

There should be a "design notes" section of the manual, even (hmm, no,
*especially*) in the beta stage. It should list the changes with:

(a) examples & discussion on how the change relates to Lua4 equivalents
(especially taking into account typical preconceptions of someone who has
not been following the list). Eg, metatables look, at a casual glance, to be
very different from tags... but are actually almost exactly the same thing.
Eg, the new "for" statement looks to be very different but is just an
expansion of the old method.

(b) the rationale of *why* such a change was implemented (and considered
desirable), and how it might affect performance.

(c) migration paths, including both changes to source plus wrappers.

This should be in the manual... separate code examples are not enough.


Björn De Meyer:
> As for the __get and __set issue, proxy tables can indeed be used,
> however, it would be nice if there was an example in the official
> distribution. And some documentation and explanation in the manual on how
> __index and __newindex work, and on how to set up a proxy table. A Lua API
> would even be nicer, but I think better documentation is what Lua 5 needs
> now the most.

This is just one of many examples that such documentation should handle.


Joe Stewart:
> Has anyone made a 4 to 5 migration guide?
>
> Would there be interest in such a guide? As I convert my lua 4 scripts to
> run under lua 5, I'll be compiling my own list. I'd be happy to put it on
> lua-users as I go.

Sounds good to me. Try to include some rationales (not just examples) about
the changes. And if you format it in the same style as the official manual
it might even get included???

*cheers*
Peter Hill.