(5) foo : bar "string" -- means pass foo as
first argument followed by "string" (and only
these two) to bar, and call.
(6) foo : bar {table} -- means pass foo as
first argument followed by {table} (and only
these two) to bar, and call.
This way (5) and (6) are particular cases
of (4). We can also interpret (5) and (6)
notation as a generic binary operator [1],
with arguments foo and "string", or foo and
{table}, and bar operator.
PROPOSAL
We also have a third, particular and common
case of (generic) unary operators [2]. At the
time this is more easily accomplished by the
notation
(7) foo : bar ()
where the *suffix* () pass nothing to bar,
it is only redundant. In this case the
*preffix* function call
(8) foo : bar
is completely defined, means pass foo
(only) to bar, and call. Very simply indeed,
and completely compatible with the Lua *look*
just implemented capabilities. Compare with
the comments of (2) and (3) above, and [2].
If you do not feel confortable with (8)
then use (7), since it is only syntactic
sugar! If you really want to be (not so)
expressive in the Lua way use
(9) foo.bar(foo)
it is only convenience, as well as (2),
(3), (5) and (6), but the expressiveness
increases a lot.
[1] example: we can think of 5 : + (6) as
simply as 5 + 6 .
[2] real(imaginay number) as z : Re, as well
as Re (z), the *prefix* and *suffix* versions.