Yeah, I am aware that’s not a namecall, sorry if that seemed misleading. My first paragraph at the top is not related to the last part of my message, I was mostly responding to the discussion of the metamethod above, and, I didn’t make it clear my reply was not about the metamethod or namecalling.
If I remember correctly that specific quirk was a bug, I don’t recall all of the details, but, it was removed with one of the initial luau releases and I vaguely remember zeuxg mentioning it.
When you use the :
notation on an instance the __namecall
metamethod is invoked to make function calls faster for instances. This metamethod used to pass the name of the method being called but in luau this was changed, and now only the self
variable and function arguments are passed to the metamethod. The name of the method is no longer passed for performance reasons, it can only be accessed in C code.