[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: wiki sections for micro-patches?
- From: Miles Bader <miles@...>
- Date: Fri, 17 Feb 2012 17:55:23 +0900
Sven Olsen <email@example.com> writes:
> lparser:body()'s new_localvarliteral() call from "self" to LUA_ENV, thus
> changing the ":" function declaration sugar from
> This is a breaking change, in the sense that it has good odds of
> profoundly changing the semantics of vanilla lua code. It also leads
> to much more concise object definitions, implying that most of the
> time, there's no longer any need to prefix member variables with self.
Er, yeah, but at the cost of essentially completely severing any
connection with the enclosing module!!! Given that the _ENV typically
contains stuff like module imports, etc., that's a pretty serious
restriction... so it could maybe work for very simple method
definitions, but it doesn't seem a good general recipe.
[As one _can_ explicitly write the _ENV version already, it seems
better to just let people do that in those cases where it works, and
leave the default behavior alone.]
P.S. All information contained in the above letter is false,
for reasons of military security.