... such things make life harder for any "intellisense" editors like
VS Studio - I agree... . Those allow flexible parameters only at the
end of the parameter list, as it would also be common in compiled
languages like C++... .
In C++ you could just use two versions of insert to get the same behavior as Lua:
void insert(std::vector<value_t>&, value_t const&);
void insert(std::vector<value_t>&, std::size_t, value_t const&);
The flexibility exists outside of interpreters too, and VS Studio should be able to handle multiple signatures in C++ (Visual Studio can).
--