[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mutability of Lua types
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 30 Sep 2006 20:16:57 -0300
> Lua numbers and strings are not mutable. Is the reason for this
> mainly the hash table usage (= changing the value would require a
> different hash slot) or are there other reasons as well?
String immutability is essential for performance. String comparison in Lua
is just pointer comparison. It's one of the strengths of the implementation.
--lhf