lua-users home
lua-l archive

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


Tom N Harris dixit:

> But there's no way to do:
>     container.immutableObject.property = foo
> 
> Just as there's no subscript operator for strings.
>     myString[string.find(myString,' ')] = '-'
> 
> Or, for that matter,
>     num += 5

It is another issue: one cannot distinguish between assignments *intended* to create a new or change an existing variable.
(see also http://spir.wikidot.com/create-vs-change, esp. section "things & qualities")

Denis
________________________________

la vita e estrany

http://spir.wikidot.com/