[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua life after integers
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 10 Dec 2014 16:52:23 +0200
2014-12-10 16:44 GMT+02:00 Rena <email@example.com>:
> Interesting. Why is __tostring not a core metamethod? The distinction
> seems arbitrary to me.
A core metamethod is a fallback. It is called when Lua does not
know what to do, as a last resort instead of throwing an error.
__tostring, __pairs etc are called _instead_ of what Lua knows