lua-users home
lua-l archive

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

On Wed, 1 Mar 2023 at 01:47, Steven Hall <> wrote:
> Hmm. f{} is not f() so no consistency is really needed. And besides there is a saying about a foolish consistency…

It is not needed, but it is nice to have it.

> If
> ```
> f (
> a,
> b,
> nil)
> ```
> doesn’t thrill then how about

Has they told you, forgetting efficiency concerns, it passes an extra
parameter. Called may behave differently.

> ```
> f (
> a,
> b,
> ...)
> ```

And this passes an unknown number of them.

No trailing comma is not needed anyway, so subsituting it for a more
complex thing is not too worthwhile, there are situations in which it
is useful like i.e.
sql_query_in_one_line = str_join(' ',
"SELECT patatin patan",
"FROM here there",
"WHERE this and that",
( Not real code, I named it sql because query building is one place
where they happen a lot to me, and they have lot of lines which I move
around during dev phase )

I normally write these things like this, as the first parameters
normally do not change/move:
sql_query_in_one_line = str_join(' '
,"SELECT patatin patan"
,"FROM here there"
,"WHERE this and that"
Just to preserve the "lines can be shuffled around".

Anyway, not needed, it has it uses, and it seems not that difficult to do.

Francisco Olarte.