lua-users home
lua-l archive

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




On 2017-04-27 09:14 PM, Scott Morgan wrote:
On 04/27/2017 06:59 PM, Soni L. wrote:
You need to use select() if you want multiple return values. It's a
single end-of-list-expr.
How about requiring parens as part of the syntax?

e.g.
function(a,b) =( b,a )
function() =( "foo" )

Or would that push the parser too far?

Scott



Ehh... not sure how I feel about this.

return (thing) already has a meaning. Requiring parens would be awful, but optional parens would be confusing (is "=(val)" the same as "return val" or "return (val)"? read the docs to find out!)...

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.