[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A tiny matter of style
- From: David Favro <lua@...>
- Date: Tue, 08 May 2018 14:37:10 +0000
On May 8, 2018 8:11:26 AM UTC, Dirk Laurie <firstname.lastname@example.org> wrote:
>When the right-hand side of an assignment is an anonymous function,
>nowadays put a semicolon after the final "end" to distinguish it
>other uses of 'end'. Do you like the idea or hate it?
I've done so for many years, but in my case it's for consistency: I terminate all assignment statements  with semicolons; an anonymous function is no different than any other expression to me (first class value).
Similarly, since "local function foo() end" is syntactic sugar for an assignment statement, I also terminate that with a semicolon.
 as well as standalone function-call statements.