[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: userdata considerations
- From: Basile STARYNKEVITCH <basile@...>
- Date: Tue, 8 Oct 2002 19:35:18 +0200
>>>>> "mnicolet" == mnicolet <mnicolet@satlink.com> writes:
mnicolet> I migrated to lua 5.0a because userdata manageability.
mnicolet> Also, I devised a lot of userdata support routines.
mnicolet> They are included in luapi ... I will post the lua 5.0
mnicolet> version of it next days. The best (unique ?) way I
mnicolet> found to deal with userdata is to have a "constructor"
mnicolet> for every of them; u = newudtype( construction arguments
mnicolet> here ) Of course, every userdata "type" must have its
mnicolet> own constructor, and of course, the constructor
mnicolet> semantics is privative for the "type" ... But I"am
mnicolet> thinking about lua"s native support for that stuff. My
mnicolet> first and main "userdata" is a lua bind to some class I
mnicolet> use extensively in my applications to "wrap" the native
mnicolet> C/C++ objects. [...]
I skipped an interesting part of Mnicolet's message. But I think it
raise the following issue: is lua a C or C++ embeddable scripting
language, i.e. does the Lua API target C or C++?
I definitely think Lua (even the 5. and future 6. versions) should
target C, not C++.
If you designed a language easy to embed into C++ applications (which
lua is not, it targets C not C++) you'll get a different API and a
different language.
I undestand C++ coders are using Lua, but Lua should target C coders,
not C++ one!
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
alias: basile<at>tunes<dot>org
8, rue de la Faïencerie, 92340 Bourg La Reine, France