lua-users home
lua-l archive

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

Hash: SHA1

Ronan Collobert wrote:
> RTTI is now since quite a while part of the C++ language.
> So I am only saying that right now "require()" does not fully support
> C++ language under any platform using gcc, while it does for Windows
> platforms. I would call that a bug.

Well, maybe. Maybe not. I tend to program in C; and as a C programmer I
*don't* want RTLD_GLOBAL --- that just ends up polluting the global namespace
and can cause serious issues if, for example, a plugin provides a symbol
that's also defined in the main program. For me, RTLD_LOCAL is nearly always
the right solution.

Lua is not supposed to be a one-size-fits-all solution. You're *supposed* to
modify it to fit your needs. RTLD_LOCAL is the principle-of-least-surprise
preferred default for C; it prevents plugin Y's behaviour from being changed
depending on whether you load plugin X beforehand. I'd be very wary about
changing this default merely because it suits C++ better.

- --
┌── ─── ───────────────────
│ "There does not now, nor will there ever, exist a programming language in
│ which it is the least bit hard to write bad programs." --- Flon's Axiom
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -