You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is almost no point in interfaces, I would like to get a "class" to use inheritance of objects, more precisely functions.
Yes, interfaces eliminate duplication of declarations of methods and class fields, but their abstraction makes it necessary to duplicate the functions of the base class for all inheritors.
If the base record has at least 3 methods and we have at least 2 inheritors, then we need to do 2*3 function duplications.
Although there are no such problems in ordinary lua, it turns out that tl, on the contrary, causes pain.
I really like Teal and I would like to be able to use "inheritance" without such restrictions.
The text was updated successfully, but these errors were encountered:
Closing as a duplicate of #97. There are no plans to introduce a class keyword. You can avoid n*m implementations of functions via metatables, as is customary in Lua.
There is almost no point in interfaces, I would like to get a "class" to use inheritance of objects, more precisely functions.
Yes, interfaces eliminate duplication of declarations of methods and class fields, but their abstraction makes it necessary to duplicate the functions of the base class for all inheritors.
If the base record has at least 3 methods and we have at least 2 inheritors, then we need to do 2*3 function duplications.
Although there are no such problems in ordinary lua, it turns out that tl, on the contrary, causes pain.
I really like Teal and I would like to be able to use "inheritance" without such restrictions.
The text was updated successfully, but these errors were encountered: