[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: functioncall vs varlist ambiguity
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 24 Jul 2010 19:20:19 -0300
> I'm wondering why this is necessary. Most other languages with a REPL
> do not require the user to disambiguate expressions and statements.
It is not necessary. The Lua stock interpreter could try first
return <user input>
and then, if that fails, try
<user input>
This is almost what it does already, except that it only tries "return ..."
if the line starts with '='.
The problem with the automatic approach is that you'd get more noise.
For instance,
io.write("Hello")
would output
Hellotrue
as you can see by entering
=io.write("Hello")