What is "TM" short for?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What is "TM" short for?

孙世龙 sunshilong
Hi, list

There are some comments that contain "TM", for example:
"TM cache", "TM calls"?

What is "TM"?
If "TM" is short for "Tag method", then a question raises:
Are "Tag method" and "Metamethod" the same?
Reply | Threaded
Open this post in threaded view
|

Re: What is "TM" short for?

Jonathan Goble
On Thu, Oct 22, 2020, 3:08 AM 孙世龙 sunshilong <[hidden email]> wrote:
Hi, list

There are some comments that contain "TM", for example:
"TM cache", "TM calls"?

What is "TM"?
If "TM" is short for "Tag method", then a question raises:
Are "Tag method" and "Metamethod" the same?

IIRC, "tag method" was the original name for what later became metamethods. Hence, they are the same thing. 
Reply | Threaded
Open this post in threaded view
|

Re: What is "TM" short for?

Roberto Ierusalimschy
In reply to this post by 孙世龙 sunshilong
> What is "TM"?
> If "TM" is short for "Tag method", then a question raises:
> Are "Tag method" and "Metamethod" the same?

Yes, TM is short for tag method. Tag methods were the ancestors of
metamethods, used before Lua 5.0 (?). When we changed the mechanism,
we did not correct every single name or comment in the Lua source that
mentioned tag methods. For the purpose of reading the code, they are the
same.

-- Roberto