I see. I think one way is to define the syntax
equals
t1[a],t1[b],t1[c] = 1,2,3
For this case. This is NOT syntactic sugar (see below).
The "best" annswer is raiser an error.
t2 = setmetatable({},{__newindex = function(t,k,v) t[k] = v end })
t2['one','two','three'] = 1,2,3
Using Soni's suggestion about k,v order your code just has the expected behaviour with the assigment
t['one']=1
And others arguments ignored as the default behaviou of Lua functions, then, a user mistake.
This question is very different from the first, since in this case (a function metamethod) the behaviour can be more powerfull.
The proposal add functionality that the user need to know how to use, as well as generic functions, Or expect the default behaviour or (maybe) an error. This is compatible with just written code.
Also, won't this conflict with the proposal for making
t[1,2,3]
as syntactic surgar for
t[1][2][3]
Yes. But the proposed syntactic sugar can be easily implemented within the proposal. (See your question about t2.)
-spc (The above wasn't a recent proposal, but I do seem to recall one like
it sometime in the past few years ... )