lua-users home
lua-l archive

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

Adrien de Croy <> writes:
> It could be considered radical maybe for tables.
> for userdata and lightuserdata, it makes perfect sense to use the same
> syntax to copy one userdata to another one the same as you would a
> string value, rather than a function to do it.

It seems a fairly fundamental part of Lua that it's a "reference"
language (like lisp/scheme, clu, etc):  variables store references to
their value, not the values (this is slightly relaxed for numbers, but
that doesn't change the general properties of this behavior).

The result is that users can rely on assignment being very cheap, and
having no side effect other than the obvious one.

I think any change to this could be considered "huge", as could be any
change that makes "assignment" (with "=") different than e.g. parameter


The car has become... an article of dress without which we feel uncertain,
unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]