lua-users home
lua-l archive

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


> 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