lua-users home
lua-l archive

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


> -----Original Message-----
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of David Jeske
> Sent: Tuesday, June 26, 2001 1:21 PM
> To: Multiple recipients of list
> Subject: Re: block return semantic
>
>
> 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 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"


I'm sorry if I was unclear in my message. I meant that most script
programmers expect all of these forms to work. Some of them prefer to write

if a < b then return 10 else return 25 end

but some are more comfortable with other, more terse forms that are not
currently supported in Lua.