lua-users home
lua-l archive

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

I disagreed with what to say about linkers (I also said that command line shells in OSes are also exctly like linkers; and variable name binding implemented in any language is in fact also like a linker). Everywhere there's an order of priority for name lookups
In programming languages, including Lua, this is called "scope", and a "closure" is the fact of binding specific sets of variables to specific scopes.
And that's what I mean by "locality".
Some names may be left unresolved by such linking/binding, leaving "external" names. Or they may be oinly partially resolved to a small subset, with a late final binding: this is what occurs with effective values of parameters of functions (but there's still always a priority order for completely resolving these links).
I do not know any example where a well defined priority order is not used by any "linker" (or programming language, or shell using linking/binding) for resolving "names", "symbols", or "variables", even in languages that allow symbolic values (e.g. Lisp, or Prolog).

Le mer. 21 nov. 2018 à 17:18, Viacheslav Usov <> a écrit :
On Wed, Nov 21, 2018 at 4:55 PM Philippe Verdy <> wrote:

> shared libaries are handled the same way

Same way as that of an unspecified linker?

Are you claiming that your description is applicable to all the operating systems and all the linkers in the world?

> But when the application will use "d" from "sharedlibary2", this could cause the implementation "a" from "sharedlibary2" to be used, even if there's also the separate implementation of "a" in sharedlibrary1.

> internal uses by shared libaries themselves are resolved internally by each shared libary itself, specifying its own internal dependencies (already resolved when they were compiled), or external dependencies (these additional dependencies must have NO impact to the application using it

So this seems to agree at least with problem "First" in the message to which you responded "I disagree".

Again, what exactly do you disagree with?