lua-users home
lua-l archive

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


On Fri, Mar 9, 2012 at 11:16 AM, Robert Virding
<robert.virding@erlang-solutions.com> wrote:
> Immutable data will/should also change the meaning of equality. If I have
>
> x1 = const {'a','b'}
> x2 = const {'a','b'}
>
> should x1 == x2?

More pointedly, should

  t = {}
  t[x1] = true
  assert( t[x2] )

succeed?

This is the question of value semantics. So, how *do* you pass tables
by value in Lua? :-)

Jay