lua-users home
lua-l archive

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


On Wed, Aug 4, 2021 at 2:56 PM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:

> Sorry, I thought that was in the manual. It won't be fixed

Since we are talking about this, I should say I never understood why
return really needs to be at the end of a block. Lua 5.0 required that
for break and return, now it is not required for break. Lua 5.0 did
not have goto, Lua 5.4 does, and it is not required to be the last
statement in the block. So it looks like return is the only
transfer-of-control statement that has this requirement, the other
such statements do not have the requirement, or it has been lifted.
Why not return, too?

Cheers,
V.