lua-users home
lua-l archive

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




On Tue, Jul 22, 2008 at 9:48 PM, Michael Ferenduros <mike.ferenduros@gmail.com> wrote:
I guess the alternative would be to come at it from the opposite direction by letting mutators to replace the thing they're mutating.

Or do it at compile-time through metalua. Several possible solutions:
- enable/disable the special assignement operator on a per-file basis, or through switch marks in the file
- declare the "assignable" variables as such with a new statement
- rely on a naming convention, e.g. assignable variables have a name starting with "v_"
- have distinctoperators for primitive and customizable assignments, e.g. "=" and ":=".