Lua is using colon operator (:) as instance method calling. Can I override this operator for another purpose?
Lua is using colon operator ( : ) as instance method calling. Can I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t. There is no such thing as colon operator- it’s pure syntactic sugar.
This does, however, mean that you can override the dot operator used here and the function call operator of the return value.