lua-users home
lua-l archive

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


I'd also like to add that as soon as Lua does this, it'll become
interactively useful in all kinds of new ways that it isn't today.

On Tue, Jun 26, 2001 at 12:41:13PM -0700, Eric Ries wrote:
> I just want to chime in that I the original idea of this thread (that is, to
> have the Lua interpreter support this) is far superior to any of these "just
> add return" methods.

Agreed.

> I have tried several methods of intelligently adding return to blocks and it
> just sucks. "Script programmers" who are used to Perl and Python and the
> like expect to be able to have the following chunks of code return a value
> from the equivalent of "eval":
> 



I don't know if this is necessary as it has no real meaning in Lua:

  > "if b < a then a else b end"

I'd have to check, but these two should be possible already today:

  > "return 1 + 2"
  > "if a > b then return 0 else return 1 end"

This one clearly dosn't work today:

  > "1 + 4"


-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net