lua-users home
lua-l archive

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


--- Sam Roberts <sroberts@bycast.com> wrote:
> But lua can't live with it.. every string is
> immutable because it is
> stored globally by hash value. If you change any
> chars inside it, you
> will wreck havoc with lua.
> 
> 	h = 'helo'
> 	l = 'helo'
> 
> lua has created only one string object, actually.
> But you can pretend
> there are two independent objects. Since the object
> can't be changed,
> you can't do anything to l that will effect h.
> 
thanks and that is why I asked if there is any
concern. What I would like to know though is what is
the consequence if I do change the content. It
invalidate the hash, would it break the GC ? 


 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097