Re: Stringification
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Stringification
- From: Gavin Wraith <gavin@...>
- Date: 2007年3月14日 17:42:23 GMT
In message <e47324780703141018k2c14d32aw565a52381581ce29@mail.gmail.com> you wrote:
> On 3/13/07, Wesley Smith <wesley.hoke@gmail.com> wrote:
> > Is there a way to stringify a variable name in Lua? Something like:
> >
> > stringify(variable) == "variable" -- evaluates to true
Lua uses eager evaluation for function application, so what you are
asking is impossible. Suppose you have
x = 77; y = 77;
Whatever stringify does, stringify(x) and stringify(y) are
both the same as stringify(77). So stringify cannot be a function
in the standard sense.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/