lua-users home
lua-l archive

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


On Fri, Aug 22, 2014 at 01:41:02PM +0200, Axel Kittenberger wrote:
> Strings are a native thing, since there are string literals in source code.
> I don't think anyone wants to string literals to go. That what makes them
> different to generic UserData. There is more to it due to automatic
> coercions and the '..' operator, but thats another story.
> 
> Mutables are bad. More mutables are worse. If I'd see a language develop,
> it be more in the directions of immutables in the direction of deeply
> frozen tables. Albeit it may seem counterintuitive at first, so many
> problems and issues go away if one would use immutables. For example the
> whole computation times of the # operator, vs. ipairs would go away in a
> poof.

Or the Lua VM could just memoize the computation of __len. Which would look
almost exactly the same under the hood.

I agree mutables cause trouble. But do they cause more trouble than not
having mutables? I mean, why are we all coding in Lua rather than Haskell?