lua-users home
lua-l archive

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


On Thu, Feb 5, 2009 at 5:13 PM, Doug Rogers
<doug.rogers@elbitsystems-us.com> wrote:
> Adding support for that kind of thing would have to be done in a way that
> resolves the ambiguities that will arise between them and the operator
> metamethods (perhaps by a precedence rule, reducing further the simplicity

Yes, C++ can do this kind of thing efficiently at compile-time, but
the conversion rules are not simple, and often lead to 'subtleties'
(as Stroustrop says delicately)

tonumber() is a well-defined place for using such a metamethod.

steve d.