lua-users home
lua-l archive

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


Even better: what could be removed? (Half-joking :o)

My tentative list:

-  function environments (see (1) below)
-  coroutines (is there *anyone* at all who agrees??  :-)  )
-  mutable upvalues (see (2) below)
-  proxy constructions

And some pluses:

+  __pairs metamethod
+  __settable, __gettable metamethods


(1) I hazard a guess that gunction environments are mainly used to "package" functions in some way (sandboxing and what not). This could also be realised with upvalues (global name lookup in an upvalue instead of fenv)

(2) I actually like the current possibility to "forward declare" locals (gives us cleaner recursive functions a/o). What would be sufficient for me is that upvalues can not be assigned to in a closure and that the closure receives a (private) copy of the value when the upvalue goes out of scope.


Small lists no?  :-D


--
Wim