Describe the solution you'd like
We all know what rest parameters are, but do we need it? I think that more common could be use array instead of this "..." syntax (or "param1, param2, ..."). For example this:
dbQuery(conn, "INSERT INTO users (name, surname, email, password) VALUES (?, ?, ?, ?)", "P", "M", "[email protected]", "test123")
could be this:
dbQuery(conn, "INSERT INTO users (name, surname, email, password) VALUES (?, ?, ?, ?)", {"P", "M", "[email protected]", "test123"})
which for me is more practical (and cleaner) because I can have declared object or array of variables higher
local values = {"P", "M", "[email protected]", "test123"}
dbQuery(conn, "INSERT INTO users (name, surname, email, password) VALUES (?, ?, ?, ?)", values)
Also people who are trying to add some type-based languages like C# could have less work to do because as i remember those languages doesn't support rest parameters.
local values = {"P", "M", "[email protected]", "test123"}
dbQuery(conn, "INSERT INTO users (name, surname, email, password) VALUES (?, ?, ?, ?)", unpack(values))
Will not fix as you can use the built in unpack function.
See @CrosRoad95's answer above.
Most helpful comment