[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: block return semantic
- From: Reuben Thomas <rrt@...>
- Date: Wed, 27 Jun 2001 10:49:04 +0100 (BST)
> 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.
and indeed (if a<b then 5 else 4) allows if...thens to be expressions rather
than statements. So you could then imagine writing c = if a <b then 5 else 4
...ooh, we're nearly at functional programming. However, it's not at all
obvious this is a good thing to do to Lua, for all sorts of reasons.
http://sc3d.org/rrt/ | competent, a. underpromoted