lua-users home
lua-l archive

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


On Thu, 25 Feb 2010 13:47:51 +0200
steve donovan <steve.j.donovan@gmail.com> wrote:

> What about the constraint that fields of _M may only be modified by
> functions inside _M? That seems a good generalization.

Ahah! I was lately thinking at something similar (in a hypothetical PL), but for for all objects, to implement the famous "command-query separation principle". The idea is that, in a query, assignments can only be local, except probably for names prefixed with "self." (or whatever convention to refer to the target's own fields).

Denis
-- 
________________________________

la vita e estrany

spir.wikidot.com