[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] ilua - an improved Lua interactive prompt
- From: "steve donovan" <steve.j.donovan@...>
- Date: Fri, 23 Nov 2007 07:04:10 +0200
On Nov 22, 2007 3:03 PM, Markus Heukelom
<Markus.Heukelom@enterprisedynamics.com> wrote:
> Nice idea, but shouldn't the __tostring metamethod decide how a value be
> printed? print() uses tostring() and tostring() tries __tostring() first.
I'm doing this already; check if a table has a __tostring metamethod first.
> Btw, in our interactive lua prompt, for convience I added '?' at the end of
> a line to do exactly the same as '=' in the standard interpreter. Reason: I
> often decide to print the result of a statement _after_ I typed it.
I tried that out, and it looks and feels good! A useful option in
those cases where using the compiler to guess whether something is an
expression or a statement is dubious.
steve d.